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

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
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | no next file » | 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
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index 655aa425de262d751bd8bfbb226aafae4ce35c3d..8813e0b25cb14fb153d619aea033e19dda98d22f 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 = "";
@@ -97,13 +101,13 @@ void SyncBackendHostForProfileSyncTest::InitCore(
void SyncBackendHostForProfileSyncTest::StartConfiguration(
const base::Closure& callback) {
SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop();
- if (initialization_state_ == DOWNLOADING_NIGORI) {
+ if (IsDownloadingNigoriForTest()) {
syncable::ModelTypeSet sync_ended;
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()));
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698