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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/it2me/it2me_native_messaging_host.cc
diff --git a/remoting/host/it2me/it2me_native_messaging_host.cc b/remoting/host/it2me/it2me_native_messaging_host.cc
index f65cb524dd3b7f950bfb2411fd708a044f374a77..b49dcf6847cf32aaa66e559fec7c86ff7a95ae84 100644
--- a/remoting/host/it2me/it2me_native_messaging_host.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host.cc
@@ -54,8 +54,8 @@ It2MeNativeMessagingHost::It2MeNativeMessagingHost(
host_context_.reset(ChromotingHostContext::Create(task_runner).release());
- ServiceUrls* service_urls = ServiceUrls::GetInstance();
- bool xmpp_server_valid =
+ const ServiceUrls* service_urls = ServiceUrls::GetInstance();
+ const bool xmpp_server_valid =
net::ParseHostAndPort(service_urls->xmpp_server_address(),
&xmpp_server_config_.host,
&xmpp_server_config_.port);
@@ -74,7 +74,7 @@ It2MeNativeMessagingHost::~It2MeNativeMessagingHost() {
}
}
-void It2MeNativeMessagingHost::Start(const base::Closure& quit_closure) {
+void It2MeNativeMessagingHost::Start(const base::Closure& quit_closure) const {
DCHECK(task_runner()->BelongsToCurrentThread());
channel_->Start(
@@ -115,7 +115,7 @@ void It2MeNativeMessagingHost::ProcessMessage(
void It2MeNativeMessagingHost::ProcessHello(
const base::DictionaryValue& message,
- scoped_ptr<base::DictionaryValue> response) {
+ scoped_ptr<base::DictionaryValue> response) const {
DCHECK(task_runner()->BelongsToCurrentThread());
response->SetString("version", STRINGIZE(VERSION));
@@ -215,7 +215,7 @@ void It2MeNativeMessagingHost::ProcessDisconnect(
void It2MeNativeMessagingHost::SendErrorAndExit(
scoped_ptr<base::DictionaryValue> response,
- const std::string& description) {
+ const std::string& description) const {
DCHECK(task_runner()->BelongsToCurrentThread());
LOG(ERROR) << description;
@@ -289,7 +289,8 @@ void It2MeNativeMessagingHost::OnClientAuthenticated(
client_username_ = client_username;
}
-scoped_refptr<AutoThreadTaskRunner> It2MeNativeMessagingHost::task_runner() {
+scoped_refptr<AutoThreadTaskRunner>
+It2MeNativeMessagingHost::task_runner() const {
return host_context_->ui_task_runner();
}
@@ -300,3 +301,4 @@ std::string It2MeNativeMessagingHost::HostStateToString(
}
} // namespace remoting
+

Powered by Google App Engine
This is Rietveld 408576698