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

Side by Side Diff: chrome/browser/sync/glue/generic_change_processor.h

Issue 23129007: sync: Add GetAllSyncData to sync/api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add GetAllSyncDataReturnError Created 7 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 const syncer::ImmutableChangeRecordList& changes) OVERRIDE; 55 const syncer::ImmutableChangeRecordList& changes) OVERRIDE;
56 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto 56 // Passes |syncer_changes_|, built in ApplyChangesFromSyncModel, onto
57 // |local_service_| by way of its ProcessSyncChanges method. 57 // |local_service_| by way of its ProcessSyncChanges method.
58 virtual void CommitChangesFromSyncModel() OVERRIDE; 58 virtual void CommitChangesFromSyncModel() OVERRIDE;
59 59
60 // syncer::SyncChangeProcessor implementation. 60 // syncer::SyncChangeProcessor implementation.
61 virtual syncer::SyncError ProcessSyncChanges( 61 virtual syncer::SyncError ProcessSyncChanges(
62 const tracked_objects::Location& from_here, 62 const tracked_objects::Location& from_here,
63 const syncer::SyncChangeList& change_list) OVERRIDE; 63 const syncer::SyncChangeList& change_list) OVERRIDE;
64 64
65 // Fills |current_sync_data| with all the syncer data for the specified type. 65 // Fills a list of SyncData. This should create an up to date representation
66 virtual syncer::SyncError GetSyncDataForType( 66 // of all the data known to the ChangeProcessor for |datatype|, and
67 // should match/be a subset of the server's view of that datatype.
68 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type)
69 const OVERRIDE;
70
71 // Similar to above, but returns a SyncError for use by direct clients
72 // of GenericChangeProcessor that may need more visibility.
Nicolas Zea 2013/09/05 00:13:08 more visibility -> more error visibility
tim (not reviewing) 2013/09/05 00:22:24 Done.
73 virtual syncer::SyncError GetAllSyncDataReturnError(
67 syncer::ModelType type, 74 syncer::ModelType type,
68 syncer::SyncDataList* current_sync_data); 75 syncer::SyncDataList* data) const;
69 76
70 // Returns the number of items for this type. 77 // Returns the number of items for this type.
71 virtual int GetSyncCountForType(syncer::ModelType type); 78 virtual int GetSyncCountForType(syncer::ModelType type);
72 79
73 // Generic versions of AssociatorInterface methods. Called by 80 // Generic versions of AssociatorInterface methods. Called by
74 // syncer::SyncableServiceAdapter or the DataTypeController. 81 // syncer::SyncableServiceAdapter or the DataTypeController.
75 virtual bool SyncModelHasUserCreatedNodes(syncer::ModelType type, 82 virtual bool SyncModelHasUserCreatedNodes(syncer::ModelType type,
76 bool* has_nodes); 83 bool* has_nodes);
77 virtual bool CryptoReadyIfNecessary(syncer::ModelType type); 84 virtual bool CryptoReadyIfNecessary(syncer::ModelType type);
78 85
(...skipping 24 matching lines...) Expand all
103 // when it starts up). As such we can't wait until Start(_) has been called, 110 // when it starts up). As such we can't wait until Start(_) has been called,
104 // and have to keep a local pointer to the user_share. 111 // and have to keep a local pointer to the user_share.
105 syncer::UserShare* const share_handle_; 112 syncer::UserShare* const share_handle_;
106 113
107 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor); 114 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor);
108 }; 115 };
109 116
110 } // namespace browser_sync 117 } // namespace browser_sync
111 118
112 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_ 119 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698