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

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

Issue 14141006: [components] Switch {RefCounted}ProfileKeyedService to use BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review Created 7 years, 8 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/signin/signin_manager.h" 7 #include "chrome/browser/signin/signin_manager.h"
8 #include "chrome/browser/signin/signin_manager_factory.h" 8 #include "chrome/browser/signin/signin_manager_factory.h"
9 #include "chrome/browser/sync/glue/data_type_controller.h" 9 #include "chrome/browser/sync/glue/data_type_controller.h"
10 #include "chrome/browser/sync/glue/sync_backend_host.h" 10 #include "chrome/browser/sync/glue/sync_backend_host.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 fail_initial_download_(false), 221 fail_initial_download_(false),
222 storage_option_(syncer::STORAGE_IN_MEMORY) { 222 storage_option_(syncer::STORAGE_IN_MEMORY) {
223 SetSyncSetupCompleted(); 223 SetSyncSetupCompleted();
224 } 224 }
225 225
226 TestProfileSyncService::~TestProfileSyncService() { 226 TestProfileSyncService::~TestProfileSyncService() {
227 } 227 }
228 228
229 // static 229 // static
230 ProfileKeyedService* TestProfileSyncService::BuildAutoStartAsyncInit( 230 ProfileKeyedService* TestProfileSyncService::BuildAutoStartAsyncInit(
231 Profile* profile) { 231 content::BrowserContext* context) {
232 Profile* profile = static_cast<Profile*>(context);
232 SigninManagerBase* signin = 233 SigninManagerBase* signin =
233 SigninManagerFactory::GetForProfile(profile); 234 SigninManagerFactory::GetForProfile(profile);
234 ProfileSyncComponentsFactoryMock* factory = 235 ProfileSyncComponentsFactoryMock* factory =
235 new ProfileSyncComponentsFactoryMock(); 236 new ProfileSyncComponentsFactoryMock();
236 return new TestProfileSyncService( 237 return new TestProfileSyncService(
237 factory, profile, signin, ProfileSyncService::AUTO_START, false); 238 factory, profile, signin, ProfileSyncService::AUTO_START, false);
238 } 239 }
239 240
240 ProfileSyncComponentsFactoryMock* 241 ProfileSyncComponentsFactoryMock*
241 TestProfileSyncService::components_factory_mock() { 242 TestProfileSyncService::components_factory_mock() {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 profile(), 289 profile(),
289 sync_prefs_.AsWeakPtr(), 290 sync_prefs_.AsWeakPtr(),
290 invalidator_storage_.AsWeakPtr(), 291 invalidator_storage_.AsWeakPtr(),
291 id_factory_, 292 id_factory_,
292 callback_, 293 callback_,
293 set_initial_sync_ended_on_init_, 294 set_initial_sync_ended_on_init_,
294 synchronous_backend_initialization_, 295 synchronous_backend_initialization_,
295 fail_initial_download_, 296 fail_initial_download_,
296 storage_option_)); 297 storage_option_));
297 } 298 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698