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

Unified Diff: chrome/browser/sync/api/syncable_service.h

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add operator= Created 9 years, 5 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: chrome/browser/sync/api/syncable_service.h
diff --git a/chrome/browser/sync/api/syncable_service.h b/chrome/browser/sync/api/syncable_service.h
index 3c409759df863acae36d1ee2e590e39c148cb081..56c11650de1abcc715657d7d4b6be73a147da832 100644
--- a/chrome/browser/sync/api/syncable_service.h
+++ b/chrome/browser/sync/api/syncable_service.h
@@ -14,6 +14,7 @@
#include "chrome/browser/sync/api/sync_data.h"
class SyncData;
+class SyncError;
typedef std::vector<SyncData> SyncDataList;
@@ -25,10 +26,14 @@ class SyncableService : public SyncChangeProcessor {
// two. After this, the SyncableService's local data should match the server
// data, and the service should be ready to receive and process any further
// SyncChange's as they occur.
+ // Returns: false if an error occurred (and |error| will be reset to describe
+ // the error).
+ // true otherwise.
virtual bool MergeDataAndStartSyncing(
syncable::ModelType type,
const SyncDataList& initial_sync_data,
- SyncChangeProcessor* sync_processor) = 0;
+ SyncChangeProcessor* sync_processor,
+ SyncError* error) = 0;
// Stop syncing the specified type and reset state.
virtual void StopSyncing(syncable::ModelType type) = 0;
@@ -40,9 +45,13 @@ class SyncableService : public SyncChangeProcessor {
// SyncChangeProcessor interface.
// Process a list of new SyncChanges and update the local data as necessary.
- virtual void ProcessSyncChanges(
+ // Returns: false if an error occurred (and |error| will be reset to describe
+ // the error).
+ // true otherwise.
+ virtual bool ProcessSyncChanges(
const tracked_objects::Location& from_here,
- const SyncChangeList& change_list) OVERRIDE = 0;
+ const SyncChangeList& change_list,
+ SyncError* error) OVERRIDE = 0;
protected:
virtual ~SyncableService();

Powered by Google App Engine
This is Rietveld 408576698