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

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.cc

Issue 455023003: Let SyncBackupManager keep backup data in memory until shutdown. Only persist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/test_profile_sync_service.h" 5 #include "chrome/browser/sync/test_profile_sync_service.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" 8 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 options->credentials.sync_token = "token"; 54 options->credentials.sync_token = "token";
55 options->credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope); 55 options->credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope);
56 options->restored_key_for_bootstrapping = ""; 56 options->restored_key_for_bootstrapping = "";
57 57
58 // It'd be nice if we avoided creating the InternalComponentsFactory in the 58 // It'd be nice if we avoided creating the InternalComponentsFactory in the
59 // first place, but SyncBackendHost will have created one by now so we must 59 // first place, but SyncBackendHost will have created one by now so we must
60 // free it. Grab the switches to pass on first. 60 // free it. Grab the switches to pass on first.
61 InternalComponentsFactory::Switches factory_switches = 61 InternalComponentsFactory::Switches factory_switches =
62 options->internal_components_factory->GetSwitches(); 62 options->internal_components_factory->GetSwitches();
63 options->internal_components_factory.reset( 63 options->internal_components_factory.reset(
64 new TestInternalComponentsFactory(factory_switches, 64 new TestInternalComponentsFactory(
65 syncer::STORAGE_IN_MEMORY)); 65 factory_switches, InternalComponentsFactory::STORAGE_IN_MEMORY,
66 InternalComponentsFactory::STORAGE_ON_DISK));
66 67
67 SyncBackendHostImpl::InitCore(options.Pass()); 68 SyncBackendHostImpl::InitCore(options.Pass());
68 } 69 }
69 70
70 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer( 71 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer(
71 syncer::ConfigureReason reason, 72 syncer::ConfigureReason reason,
72 syncer::ModelTypeSet to_download, 73 syncer::ModelTypeSet to_download,
73 syncer::ModelTypeSet to_purge, 74 syncer::ModelTypeSet to_purge,
74 syncer::ModelTypeSet to_journal, 75 syncer::ModelTypeSet to_journal,
75 syncer::ModelTypeSet to_unapply, 76 syncer::ModelTypeSet to_unapply,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 169
169 void TestProfileSyncService::OnConfigureDone( 170 void TestProfileSyncService::OnConfigureDone(
170 const sync_driver::DataTypeManager::ConfigureResult& result) { 171 const sync_driver::DataTypeManager::ConfigureResult& result) {
171 ProfileSyncService::OnConfigureDone(result); 172 ProfileSyncService::OnConfigureDone(result);
172 base::MessageLoop::current()->Quit(); 173 base::MessageLoop::current()->Quit();
173 } 174 }
174 175
175 UserShare* TestProfileSyncService::GetUserShare() const { 176 UserShare* TestProfileSyncService::GetUserShare() const {
176 return backend_->GetUserShare(); 177 return backend_->GetUserShare();
177 } 178 }
OLDNEW
« no previous file with comments | « no previous file | sync/BUILD.gn » ('j') | sync/internal_api/public/test/test_internal_components_factory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698