Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: remoting/host/it2me/it2me_native_messaging_host.cc

Issue 138833009: For C++ readability review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/it2me/it2me_native_messaging_host.h" 5 #include "remoting/host/it2me/it2me_native_messaging_host.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 weak_factory_(this) { 48 weak_factory_(this) {
49 weak_ptr_ = weak_factory_.GetWeakPtr(); 49 weak_ptr_ = weak_factory_.GetWeakPtr();
50 50
51 // Initialize the host context to manage the threads for the it2me host. 51 // Initialize the host context to manage the threads for the it2me host.
52 // The native messaging host, rather than the It2MeHost object, owns and 52 // The native messaging host, rather than the It2MeHost object, owns and
53 // maintains the lifetime of the host context. 53 // maintains the lifetime of the host context.
54 54
55 host_context_.reset(ChromotingHostContext::Create(task_runner).release()); 55 host_context_.reset(ChromotingHostContext::Create(task_runner).release());
56 56
57 ServiceUrls* service_urls = ServiceUrls::GetInstance(); 57 ServiceUrls* service_urls = ServiceUrls::GetInstance();
58 bool xmpp_server_valid = 58 bool xmpp_server_valid =
nadav 2014/02/06 08:23:49 const? http://google-styleguide.googlecode.com/svn
weitao 2014/02/19 00:40:03 Done.
59 net::ParseHostAndPort(service_urls->xmpp_server_address(), 59 net::ParseHostAndPort(service_urls->xmpp_server_address(),
60 &xmpp_server_config_.host, 60 &xmpp_server_config_.host,
61 &xmpp_server_config_.port); 61 &xmpp_server_config_.port);
62 DCHECK(xmpp_server_valid); 62 DCHECK(xmpp_server_valid);
63 63
64 xmpp_server_config_.use_tls = service_urls->xmpp_server_use_tls(); 64 xmpp_server_config_.use_tls = service_urls->xmpp_server_use_tls();
65 directory_bot_jid_ = service_urls->directory_bot_jid(); 65 directory_bot_jid_ = service_urls->directory_bot_jid();
66 } 66 }
67 67
68 It2MeNativeMessagingHost::~It2MeNativeMessagingHost() { 68 It2MeNativeMessagingHost::~It2MeNativeMessagingHost() {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 return host_context_->ui_task_runner(); 293 return host_context_->ui_task_runner();
294 } 294 }
295 295
296 /* static */ 296 /* static */
297 std::string It2MeNativeMessagingHost::HostStateToString( 297 std::string It2MeNativeMessagingHost::HostStateToString(
298 It2MeHostState host_state) { 298 It2MeHostState host_state) {
299 return ValueToName(kIt2MeHostStates, host_state); 299 return ValueToName(kIt2MeHostStates, host_state);
300 } 300 }
301 301
302 } // namespace remoting 302 } // namespace remoting
303
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698