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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 10048003: The Chromoting service should not start automatically unless it was configured from the webapp to d… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index adb79f9855ae7623879e30c543b7df3ebe13bca7..6f55f13deb192d960972857573a1beb8459ccf70 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -48,6 +48,10 @@
namespace {
+// The process exit codes.
Wez 2012/04/10 21:26:20 nit: This comment doesn't really add anything.
alexeypa (please no reviews) 2012/04/10 22:18:16 Done.
+const int kSuccessExitCode = 0;
+const int kInvalidHostConfigurationExitCode = 1;
+
// This is used for tagging system event logs.
const char kApplicationName[] = "chromoting";
@@ -107,7 +111,7 @@ class HostProcess : public OAuthClient::Delegate {
int Run() {
bool tokens_pending = false;
if (!LoadConfig(file_io_thread_.message_loop_proxy(), &tokens_pending)) {
- return 1;
+ return kInvalidHostConfigurationExitCode;
}
if (tokens_pending) {
// If we have an OAuth refresh token, then XmppSignalStrategy can't
@@ -122,7 +126,7 @@ class HostProcess : public OAuthClient::Delegate {
message_loop_.Run();
- return 0;
+ return kSuccessExitCode;
}
// Overridden from OAuthClient::Delegate

Powered by Google App Engine
This is Rietveld 408576698