summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue/shared_change_processor.cc
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 00:38:04 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 00:38:04 +0000
commit6ce93eac08ab2a2630b6cceeb4608f9f3f20ebde (patch)
tree770cb6d2035f7885733d576febf06e0d5ed279e8 /chrome/browser/sync/glue/shared_change_processor.cc
parent4588b3d14c1b2b91729ea4807d13c92e9e48b427 (diff)
downloadchromium_src-6ce93eac08ab2a2630b6cceeb4608f9f3f20ebde.zip
chromium_src-6ce93eac08ab2a2630b6cceeb4608f9f3f20ebde.tar.gz
chromium_src-6ce93eac08ab2a2630b6cceeb4608f9f3f20ebde.tar.bz2
[Sync] Add datatype controller support for tracking association stats
SyncMergeResult is a new class that allows datatypes and sync itself to record association information for later use by the debug info listener. We introduce the class and add some plumbing at the DTC level to pass these on to the model association manager (and from there to the debug listener). Similarly, to track syncer changes, we pass a SyncMergeResult weak pointer to the SharedChangeProcessor, which while it's valid will increment the deltas as changes arrive (in a future patch). The weak pointer is invalidated at the end of association by the DTC. To simplify the DTC plumbing of merge results, StartFailed has been merged into StartDone. Additionally, removed some old logging code attempting to identify which datatype was being Stopped that isn't necessary anymore. BUG=158576 Review URL: https://chromiumcodereview.appspot.com/11401002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167528 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/shared_change_processor.cc')
-rw-r--r--chrome/browser/sync/glue/shared_change_processor.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/sync/glue/shared_change_processor.cc b/chrome/browser/sync/glue/shared_change_processor.cc
index 1e536d1..324e7a4 100644
--- a/chrome/browser/sync/glue/shared_change_processor.cc
+++ b/chrome/browser/sync/glue/shared_change_processor.cc
@@ -49,7 +49,8 @@ base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect(
ProfileSyncComponentsFactory* sync_factory,
ProfileSyncService* sync_service,
DataTypeErrorHandler* error_handler,
- syncer::ModelType type) {
+ syncer::ModelType type,
+ const base::WeakPtr<syncer::SyncMergeResult>& merge_result) {
DCHECK(sync_factory);
DCHECK(sync_service);
DCHECK(error_handler);
@@ -68,6 +69,8 @@ base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect(
disconnected_ = true;
return base::WeakPtr<syncer::SyncableService>();
}
+
+ // TODO(zea): Pass |merge_result| to the generic change processor.
generic_change_processor_ =
sync_factory->CreateGenericChangeProcessor(sync_service_,
error_handler,