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

Unified Diff: chrome/browser/sync/test_profile_sync_service.cc

Issue 17911005: Merge 208347 "Revert 208315 "Make use of InvalidationService"" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: Created 7 years, 6 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/test_profile_sync_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test_profile_sync_service.cc
===================================================================
--- chrome/browser/sync/test_profile_sync_service.cc (revision 208727)
+++ chrome/browser/sync/test_profile_sync_service.cc (working copy)
@@ -36,6 +36,7 @@
SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest(
Profile* profile,
const base::WeakPtr<SyncPrefs>& sync_prefs,
+ const base::WeakPtr<invalidation::InvalidatorStorage>& invalidator_storage,
syncer::TestIdFactory& id_factory,
base::Closure& callback,
bool set_initial_sync_ended_on_init,
@@ -43,7 +44,7 @@
bool fail_initial_download,
syncer::StorageOption storage_option)
: browser_sync::SyncBackendHost(
- profile->GetDebugName(), profile, sync_prefs),
+ profile->GetDebugName(), profile, sync_prefs, invalidator_storage),
weak_ptr_factory_(this),
id_factory_(id_factory),
callback_(callback),
@@ -115,13 +116,8 @@
if (fail_initial_download_)
failed_configuration_types = to_download;
- // The first parameter there should be the set of enabled types. That's not
- // something we have access to from this strange test harness. We'll just
- // send back the list of newly configured types instead and hope it doesn't
- // break anything.
FinishConfigureDataTypesOnFrontendLoop(
syncer::Difference(to_download, failed_configuration_types),
- syncer::Difference(to_download, failed_configuration_types),
failed_configuration_types,
ready_task);
}
@@ -183,6 +179,16 @@
}
}
+void SyncBackendHostForProfileSyncTest::EmitOnInvalidatorStateChange(
+ syncer::InvalidatorState state) {
+ frontend()->OnInvalidatorStateChange(state);
+}
+
+void SyncBackendHostForProfileSyncTest::EmitOnIncomingInvalidation(
+ const syncer::ObjectIdInvalidationMap& invalidation_map) {
+ frontend()->OnIncomingInvalidation(invalidation_map);
+}
+
void SyncBackendHostForProfileSyncTest::ContinueInitialization(
const syncer::WeakHandle<syncer::JsBackend>& js_backend,
const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
@@ -305,6 +311,7 @@
backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest(
profile(),
sync_prefs_.AsWeakPtr(),
+ invalidator_storage_.AsWeakPtr(),
id_factory_,
callback_,
set_initial_sync_ended_on_init_,
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698