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

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

Issue 8938013: [Sync] Make SyncBackendHost::Core use a WeakHandle to its host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 9 years 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
Index: chrome/browser/sync/test_profile_sync_service.cc
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 655aa425de262d751bd8bfbb226aafae4ce35c3d..a85d815e1be1873dc1c4377eb77a0daeb77711ea 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -66,21 +66,25 @@ void SyncBackendHostForProfileSyncTest::
if (!fail_initial_download_)
sync_ended = syncable::ModelTypeSet::All();
std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
- core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
+ HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
SyncerStatus(), ErrorCounters(), 0, false,
sync_ended, download_progress_markers, false, false, 0, 0, 0, false,
SyncSourceInfo(), 0, base::Time::Now()));
}
-sync_api::HttpPostProviderFactory*
- SyncBackendHostForProfileSyncTest::MakeHttpBridgeFactory(
- const scoped_refptr<net::URLRequestContextGetter>& getter) {
- return new browser_sync::TestHttpBridgeFactory;
+namespace {
+
+sync_api::HttpPostProviderFactory* MakeTestHttpBridgeFactory() {
+ return new browser_sync::TestHttpBridgeFactory();
}
+} // namespace
+
void SyncBackendHostForProfileSyncTest::InitCore(
- const Core::DoInitializeOptions& options) {
- Core::DoInitializeOptions test_options = options;
+ const DoInitializeOptions& options) {
+ DoInitializeOptions test_options = options;
+ test_options.make_http_bridge_factory_fn =
+ base::Bind(&MakeTestHttpBridgeFactory);
test_options.credentials.email = "testuser@gmail.com";
test_options.credentials.sync_token = "token";
test_options.restored_key_for_bootstrapping = "";
@@ -103,7 +107,7 @@ void SyncBackendHostForProfileSyncTest::StartConfiguration(
if (!fail_initial_download_)
sync_ended.Put(syncable::NIGORI);
std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
- core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
+ HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
SyncerStatus(), ErrorCounters(), 0, false,
sync_ended, download_progress_markers, false, false, 0, 0, 0, false,
SyncSourceInfo(), 0, base::Time::Now()));

Powered by Google App Engine
This is Rietveld 408576698