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

Unified Diff: components/sync_driver/data_type_controller.h

Issue 420633002: [Sync] Cleanup datatype configuration error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 6 years, 4 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: components/sync_driver/data_type_controller.h
diff --git a/components/sync_driver/data_type_controller.h b/components/sync_driver/data_type_controller.h
index c1e8a05e71e620aaaeb7730e32124c30dbd340d9..7d8b67cabce2ed87df04cba8933a1e3e19fe3ad1 100644
--- a/components/sync_driver/data_type_controller.h
+++ b/components/sync_driver/data_type_controller.h
@@ -51,7 +51,7 @@ class DataTypeController
// so it is disabled waiting for it to be stopped.
};
- enum StartResult {
+ enum ConfigureResult {
OK, // The data type has started normally.
OK_FIRST_RUN, // Same as OK, but sent on first successful
// start for this type for this user as
@@ -61,10 +61,11 @@ class DataTypeController
UNRECOVERABLE_ERROR, // An unrecoverable error occured.
NEEDS_CRYPTO, // The data type cannot be started yet because it
// depends on the cryptographer.
+ RUNTIME_ERROR, // After starting, a runtime error was encountered.
MAX_START_RESULT
};
- typedef base::Callback<void(StartResult,
+ typedef base::Callback<void(ConfigureResult,
const syncer::SyncMergeResult&,
const syncer::SyncMergeResult&)> StartCallback;
@@ -80,10 +81,10 @@ class DataTypeController
// Returns true if the start result should trigger an unrecoverable error.
// Public so unit tests can use this function as well.
- static bool IsUnrecoverableResult(StartResult result);
+ static bool IsUnrecoverableResult(ConfigureResult result);
// Returns true if the datatype started successfully.
- static bool IsSuccessfulResult(StartResult result);
+ static bool IsSuccessfulResult(ConfigureResult result);
// Begins asynchronous operation of loading the model to get it ready for
// model association. Once the models are loaded the callback will be invoked
« no previous file with comments | « chrome/browser/sync/profile_sync_service_startup_unittest.cc ('k') | components/sync_driver/data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698