summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 23:30:01 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 23:30:01 +0000
commitfe4b4ca1cb79ebda1178acda69dbb7a5b313b2d8 (patch)
tree7cba02daec30345fc35c9a96ec0def2c0364ad40 /sync
parent3bbc01727c811b056b71c97a6259dd967d8f031f (diff)
downloadchromium_src-fe4b4ca1cb79ebda1178acda69dbb7a5b313b2d8.zip
chromium_src-fe4b4ca1cb79ebda1178acda69dbb7a5b313b2d8.tar.gz
chromium_src-fe4b4ca1cb79ebda1178acda69dbb7a5b313b2d8.tar.bz2
sync: Add GetAllSyncData to sync/api
This allows datatype SyncableServices to request a fresh copy of the data that was previously only passed over in batch form during MergeDataAndStartSyncing. Since it can be slow, it should be used sparingly. Though currently unused, Sessions will soon need this behavior to deal with cases where (e.g) the local session is deleted by a foreign client, thereby corrupting TabNodePool tracking and requiring a full re-association. TBR=zea@chromium.org ^Many function signature touchups under browser/ BUG=98892 Review URL: https://codereview.chromium.org/23129007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r--sync/api/sync_change_processor.h10
-rw-r--r--sync/api/syncable_service.h5
2 files changed, 10 insertions, 5 deletions
diff --git a/sync/api/sync_change_processor.h b/sync/api/sync_change_processor.h
index c2dad3f..69494f0 100644
--- a/sync/api/sync_change_processor.h
+++ b/sync/api/sync_change_processor.h
@@ -7,8 +7,10 @@
#include <vector>
+#include "sync/api/sync_data.h"
#include "sync/api/sync_error.h"
#include "sync/base/sync_export.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace tracked_objects {
class Location;
@@ -36,6 +38,14 @@ class SYNC_EXPORT SyncChangeProcessor {
virtual SyncError ProcessSyncChanges(
const tracked_objects::Location& from_here,
const SyncChangeList& change_list) = 0;
+
+ // Fills a list of SyncData. This should create an up to date representation
+ // of all the data known to the ChangeProcessor for |datatype|, and
+ // should match/be a subset of the server's view of that datatype.
+ //
+ // WARNING: This can be a potentially slow & memory intensive operation and
+ // should only be used when absolutely necessary / sparingly.
+ virtual SyncDataList GetAllSyncData(ModelType type) const = 0;
};
} // namespace syncer
diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h
index 13225ca..81b6018 100644
--- a/sync/api/syncable_service.h
+++ b/sync/api/syncable_service.h
@@ -56,11 +56,6 @@ class SYNC_EXPORT SyncableService
// Stop syncing the specified type and reset state.
virtual void StopSyncing(ModelType type) = 0;
- // Fills a list of SyncData from the local data. This should create an up
- // to date representation of the SyncableService's view of that datatype, and
- // should match/be a subset of the server's view of that datatype.
- virtual SyncDataList GetAllSyncData(ModelType type) const = 0;
-
// SyncChangeProcessor interface.
// Process a list of new SyncChanges and update the local data as necessary.
// Returns: A default SyncError (IsSet() == false) if no errors were