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

Side by Side Diff: sync/api/syncable_service.h

Issue 23129007: sync: Add GetAllSyncData to sync/api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SYNC_API_SYNCABLE_SERVICE_H_ 5 #ifndef SYNC_API_SYNCABLE_SERVICE_H_
6 #define SYNC_API_SYNCABLE_SERVICE_H_ 6 #define SYNC_API_SYNCABLE_SERVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // may also contain optional merge statistics. 49 // may also contain optional merge statistics.
50 virtual SyncMergeResult MergeDataAndStartSyncing( 50 virtual SyncMergeResult MergeDataAndStartSyncing(
51 ModelType type, 51 ModelType type,
52 const SyncDataList& initial_sync_data, 52 const SyncDataList& initial_sync_data,
53 scoped_ptr<SyncChangeProcessor> sync_processor, 53 scoped_ptr<SyncChangeProcessor> sync_processor,
54 scoped_ptr<SyncErrorFactory> error_handler) = 0; 54 scoped_ptr<SyncErrorFactory> error_handler) = 0;
55 55
56 // Stop syncing the specified type and reset state. 56 // Stop syncing the specified type and reset state.
57 virtual void StopSyncing(ModelType type) = 0; 57 virtual void StopSyncing(ModelType type) = 0;
58 58
59 // Fills a list of SyncData from the local data. This should create an up
60 // to date representation of the SyncableService's view of that datatype, and
61 // should match/be a subset of the server's view of that datatype.
62 virtual SyncDataList GetAllSyncData(ModelType type) const = 0;
haitaol1 2013/08/19 17:11:04 Should this also be removed from subclasses of Syn
tim (not reviewing) 2013/08/19 18:03:08 Note that I've really only moved this method up in
63
64 // SyncChangeProcessor interface. 59 // SyncChangeProcessor interface.
65 // Process a list of new SyncChanges and update the local data as necessary. 60 // Process a list of new SyncChanges and update the local data as necessary.
66 // Returns: A default SyncError (IsSet() == false) if no errors were 61 // Returns: A default SyncError (IsSet() == false) if no errors were
67 // encountered, and a filled SyncError (IsSet() == true) 62 // encountered, and a filled SyncError (IsSet() == true)
68 // otherwise. 63 // otherwise.
69 virtual SyncError ProcessSyncChanges( 64 virtual SyncError ProcessSyncChanges(
70 const tracked_objects::Location& from_here, 65 const tracked_objects::Location& from_here,
71 const SyncChangeList& change_list) OVERRIDE = 0; 66 const SyncChangeList& change_list) OVERRIDE = 0;
72 67
73 protected: 68 protected:
74 virtual ~SyncableService(); 69 virtual ~SyncableService();
75 }; 70 };
76 71
77 } // namespace syncer 72 } // namespace syncer
78 73
79 #endif // SYNC_API_SYNCABLE_SERVICE_H_ 74 #endif // SYNC_API_SYNCABLE_SERVICE_H_
OLDNEW
« sync/api/sync_change_processor.h ('K') | « sync/api/sync_change_processor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698