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

Unified Diff: components/sync/driver/data_type_controller.cc

Issue 2834453006: [Sync] Update Type Info section of sync-internals. (Closed)
Patch Set: Reworked some of the variables in GetTypeStatusMap(). Created 3 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
« no previous file with comments | « components/sync/driver/data_type_controller.h ('k') | components/sync/driver/resources/about.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/data_type_controller.cc
diff --git a/components/sync/driver/data_type_controller.cc b/components/sync/driver/data_type_controller.cc
index de3e7f64c490eccd1a0f65e061f0a719ab758197..79c78f743ce620df8414170f9da26103e3d2fd0a 100644
--- a/components/sync/driver/data_type_controller.cc
+++ b/components/sync/driver/data_type_controller.cc
@@ -13,14 +13,38 @@ DataTypeController::DataTypeController(ModelType type) : type_(type) {}
DataTypeController::~DataTypeController() {}
+// static
bool DataTypeController::IsUnrecoverableResult(ConfigureResult result) {
return (result == UNRECOVERABLE_ERROR);
}
+// static
bool DataTypeController::IsSuccessfulResult(ConfigureResult result) {
return (result == OK || result == OK_FIRST_RUN);
}
+// static
+std::string DataTypeController::StateToString(State state) {
+ switch (state) {
+ case NOT_RUNNING:
+ return "Not Running";
+ case MODEL_STARTING:
+ return "Model Starting";
+ case MODEL_LOADED:
+ return "Model Loaded";
+ case ASSOCIATING:
+ return "Associating";
+ case RUNNING:
+ return "Running";
+ case STOPPING:
+ return "Stopping";
+ case DISABLED:
+ return "Disabled";
+ }
+ NOTREACHED();
+ return "Invalid";
+}
+
bool DataTypeController::ReadyForStart() const {
return true;
}
« no previous file with comments | « components/sync/driver/data_type_controller.h ('k') | components/sync/driver/resources/about.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698