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

Side by Side Diff: ios/chrome/browser/sync/sync_setup_service_factory.cc

Issue 2345843003: [Sync] Merge //components/browser_sync into one directory. (Closed)
Patch Set: Address comment + rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/chrome/browser/sync/sync_setup_service_factory.h" 5 #include "ios/chrome/browser/sync/sync_setup_service_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "components/browser_sync/browser/profile_sync_service.h" 9 #include "components/browser_sync/profile_sync_service.h"
10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" 10 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
12 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h" 12 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
13 #include "ios/chrome/browser/sync/sync_setup_service.h" 13 #include "ios/chrome/browser/sync/sync_setup_service.h"
14 14
15 // static 15 // static
16 SyncSetupService* SyncSetupServiceFactory::GetForBrowserState( 16 SyncSetupService* SyncSetupServiceFactory::GetForBrowserState(
17 ios::ChromeBrowserState* browser_state) { 17 ios::ChromeBrowserState* browser_state) {
18 return static_cast<SyncSetupService*>( 18 return static_cast<SyncSetupService*>(
19 GetInstance()->GetServiceForBrowserState(browser_state, true)); 19 GetInstance()->GetServiceForBrowserState(browser_state, true));
(...skipping 22 matching lines...) Expand all
42 } 42 }
43 43
44 std::unique_ptr<KeyedService> SyncSetupServiceFactory::BuildServiceInstanceFor( 44 std::unique_ptr<KeyedService> SyncSetupServiceFactory::BuildServiceInstanceFor(
45 web::BrowserState* context) const { 45 web::BrowserState* context) const {
46 ios::ChromeBrowserState* browser_state = 46 ios::ChromeBrowserState* browser_state =
47 ios::ChromeBrowserState::FromBrowserState(context); 47 ios::ChromeBrowserState::FromBrowserState(context);
48 return base::MakeUnique<SyncSetupService>( 48 return base::MakeUnique<SyncSetupService>(
49 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state), 49 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state),
50 browser_state->GetPrefs()); 50 browser_state->GetPrefs());
51 } 51 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/sync/ios_chrome_sync_client.mm ('k') | ios/chrome/browser/ui/webui/history/browsing_history_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698