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

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: Rebase and fix final unit test <3 c++ 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
« no previous file with comments | « chrome/browser/sync/api/sync_error_unittest.cc ('k') | chrome/browser/sync/api/syncable_service_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9d7ae621b7b8cb534a7e2d7b7660a5c99784d81e 100644
--- a/chrome/browser/sync/api/syncable_service.h
+++ b/chrome/browser/sync/api/syncable_service.h
@@ -12,6 +12,7 @@
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/api/sync_change_processor.h"
#include "chrome/browser/sync/api/sync_data.h"
+#include "chrome/browser/sync/api/sync_error.h"
class SyncData;
@@ -25,7 +26,10 @@ 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.
- virtual bool MergeDataAndStartSyncing(
+ // Returns: A default SyncError (IsSet() == false) if no errors were
+ // encountered, and a filled SyncError (IsSet() == true)
+ // otherwise.
+ virtual SyncError MergeDataAndStartSyncing(
syncable::ModelType type,
const SyncDataList& initial_sync_data,
SyncChangeProcessor* sync_processor) = 0;
@@ -40,7 +44,10 @@ class SyncableService : public SyncChangeProcessor {
// SyncChangeProcessor interface.
// Process a list of new SyncChanges and update the local data as necessary.
- virtual void ProcessSyncChanges(
+ // Returns: A default SyncError (IsSet() == false) if no errors were
+ // encountered, and a filled SyncError (IsSet() == true)
+ // otherwise.
+ virtual SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
const SyncChangeList& change_list) OVERRIDE = 0;
« no previous file with comments | « chrome/browser/sync/api/sync_error_unittest.cc ('k') | chrome/browser/sync/api/syncable_service_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698