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

Unified Diff: remoting/host/setup/daemon_controller.h

Issue 16236008: Send enums as strings between Chromoting Native Messaging host and web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/setup/daemon_controller.h
diff --git a/remoting/host/setup/daemon_controller.h b/remoting/host/setup/daemon_controller.h
index 4fda7c9f07191729635b75345d3f4cc20164511b..e04ebfd99c13ce06b7e2ba6331b5eb7418ae5b07 100644
--- a/remoting/host/setup/daemon_controller.h
+++ b/remoting/host/setup/daemon_controller.h
@@ -18,7 +18,7 @@ namespace remoting {
class DaemonController {
public:
- // Note that these enumeration values are duplicated in daemon_plugin.js and
+ // Note that these enumeration values are duplicated in host_controller.js and
// must be kept in sync.
enum State {
// Placeholder state for platforms on which the daemon process is not
@@ -47,6 +47,16 @@ class DaemonController {
STATE_UNKNOWN = 6
};
+ // These names must match the enumeration key names in host_controller.js.
+ static const char kStateNotImplemented[];
Sergey Ulanov 2013/05/30 23:14:52 These consts do not need to be in this class - it'
Lambros 2013/05/31 01:32:56 Done.
+ static const char kStateNotInstalled[];
+ static const char kStateInstalling[];
+ static const char kStateStopped[];
+ static const char kStateStarting[];
+ static const char kStateStarted[];
+ static const char kStateStopping[];
+ static const char kStateUnknown[];
+
// Enum used for completion callback.
enum AsyncResult {
RESULT_OK = 0,
@@ -65,6 +75,11 @@ class DaemonController {
// them in the webapp.
};
+ static const char kResultOk[];
+ static const char kResultFailed[];
+ static const char kResultCancelled[];
+ static const char kResultFailedDirectory[];
+
// Callback type for GetConfig(). If the host is configured then a dictionary
// is returned containing host_id and xmpp_login, with security-sensitive
// fields filtered out. An empty dictionary is returned if the host is not
« no previous file with comments | « no previous file | remoting/host/setup/daemon_controller.cc » ('j') | remoting/host/setup/native_messaging_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698