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

Unified Diff: components/sync/model/model_type_change_processor.h

Issue 2620773002: [Sync] Use ModelError all the way through to ModelTypeController. (Closed)
Patch Set: const& everything and use a typedef. Created 3 years, 11 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/model/model_error.h ('k') | components/sync/model/model_type_sync_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model/model_type_change_processor.h
diff --git a/components/sync/model/model_type_change_processor.h b/components/sync/model/model_type_change_processor.h
index 838449815b13ca75cf71e38a46aedd2ddf62bf30..1f2885b5c0d311c0a6d6f1228543ae05de6d8f08 100644
--- a/components/sync/model/model_type_change_processor.h
+++ b/components/sync/model/model_type_change_processor.h
@@ -8,10 +8,10 @@
#include <memory>
#include <string>
+#include "base/callback.h"
#include "base/location.h"
#include "components/sync/base/model_type.h"
#include "components/sync/engine/activation_context.h"
-#include "components/sync/model/data_type_error_handler.h"
#include "components/sync/model/entity_data.h"
#include "components/sync/model/model_error.h"
@@ -20,13 +20,12 @@ namespace syncer {
class MetadataBatch;
class MetadataChangeList;
class ModelTypeSyncBridge;
-class SyncError;
// Interface used by the ModelTypeSyncBridge to inform sync of local
// changes.
class ModelTypeChangeProcessor {
public:
- typedef base::Callback<void(SyncError, std::unique_ptr<ActivationContext>)>
+ typedef base::Callback<void(std::unique_ptr<ActivationContext>)>
StartCallback;
// A factory function to make an implementation of ModelTypeChangeProcessor.
@@ -57,12 +56,11 @@ class ModelTypeChangeProcessor {
// Indicates that sync wants to connect a sync worker to this processor. Once
// the processor has metadata from the bridge, it will pass the info needed
// for the worker into |callback|. |error_handler| is how the processor will
- // inform sync of any unrecoverable errors after calling |callback|, and it is
- // guaranteed to outlive the processor. StartCallback takes a SyncError and an
- // ActivationContext; the context should be nullptr iff the error is set.
- virtual void OnSyncStarting(
- std::unique_ptr<DataTypeErrorHandler> error_handler,
- const StartCallback& callback) = 0;
+ // inform sync of any unrecoverable errors, and is guaranteed to outlive the
+ // processor. If an error is encountered, |error_handler| should be called
+ // and |callback| should not.
+ virtual void OnSyncStarting(const ModelErrorHandler& error_handler,
+ const StartCallback& callback) = 0;
// Indicates that sync is being disabled permanently for this data type. All
// metadata should be erased from storage.
« no previous file with comments | « components/sync/model/model_error.h ('k') | components/sync/model/model_type_sync_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698