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

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

Issue 1422773004: [sync] Abstract most ProfileSyncService //chrome deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pss_chrome_signin_deps
Patch Set: Response to review Created 5 years, 1 month 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
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/profile_sync_service_factory.h" 5 #include "chrome/browser/sync/profile_sync_service_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 browser_defaults::kSyncAutoStarts ? browser_sync::AUTO_START 181 browser_defaults::kSyncAutoStarts ? browser_sync::AUTO_START
182 : browser_sync::MANUAL_START; 182 : browser_sync::MANUAL_START;
183 scoped_ptr<sync_driver::SyncApiComponentFactory> sync_factory( 183 scoped_ptr<sync_driver::SyncApiComponentFactory> sync_factory(
184 new ProfileSyncComponentsFactoryImpl( 184 new ProfileSyncComponentsFactoryImpl(
185 profile, base::CommandLine::ForCurrentProcess(), sync_service_url, 185 profile, base::CommandLine::ForCurrentProcess(), sync_service_url,
186 token_service, url_request_context_getter)); 186 token_service, url_request_context_getter));
187 scoped_ptr<browser_sync::ChromeSyncClient> sync_client( 187 scoped_ptr<browser_sync::ChromeSyncClient> sync_client(
188 new browser_sync::ChromeSyncClient(profile, sync_factory.Pass())); 188 new browser_sync::ChromeSyncClient(profile, sync_factory.Pass()));
189 ProfileSyncService* pss = new ProfileSyncService( 189 ProfileSyncService* pss = new ProfileSyncService(
190 sync_client.Pass(), profile, signin_wrapper.Pass(), token_service, 190 sync_client.Pass(), profile, signin_wrapper.Pass(), token_service,
191 behavior, base::Bind(&UpdateNetworkTime)); 191 behavior, base::Bind(&UpdateNetworkTime), profile->GetPath(),
192 profile->GetRequestContext(), profile->GetDebugName(),
193 chrome::GetChannel(),
194 content::BrowserThread::GetMessageLoopProxyForThread(
195 content::BrowserThread::DB),
196 content::BrowserThread::GetMessageLoopProxyForThread(
197 content::BrowserThread::FILE),
198 content::BrowserThread::GetBlockingPool());
192 pss->Initialize(); 199 pss->Initialize();
193 return pss; 200 return pss;
194 } 201 }
195 202
196 // static 203 // static
197 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) { 204 bool ProfileSyncServiceFactory::HasProfileSyncService(Profile* profile) {
198 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL; 205 return GetInstance()->GetServiceForBrowserContext(profile, false) != NULL;
199 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698