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

Side by Side Diff: chrome/browser/bookmarks/startup_task_runner_service_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/bookmarks/startup_task_runner_service_factory.h" 5 #include "chrome/browser/bookmarks/startup_task_runner_service_factory.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "components/bookmarks/browser/startup_task_runner_service.h" 8 #include "components/bookmarks/browser/startup_task_runner_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 10
(...skipping 10 matching lines...) Expand all
21 // static 21 // static
22 StartupTaskRunnerService* StartupTaskRunnerServiceFactory::GetForProfile( 22 StartupTaskRunnerService* StartupTaskRunnerServiceFactory::GetForProfile(
23 Profile* profile) { 23 Profile* profile) {
24 return static_cast<StartupTaskRunnerService*>( 24 return static_cast<StartupTaskRunnerService*>(
25 GetInstance()->GetServiceForBrowserContext(profile, true)); 25 GetInstance()->GetServiceForBrowserContext(profile, true));
26 } 26 }
27 27
28 // static 28 // static
29 StartupTaskRunnerServiceFactory* 29 StartupTaskRunnerServiceFactory*
30 StartupTaskRunnerServiceFactory::GetInstance() { 30 StartupTaskRunnerServiceFactory::GetInstance() {
31 return Singleton<StartupTaskRunnerServiceFactory>::get(); 31 return base::Singleton<StartupTaskRunnerServiceFactory>::get();
32 } 32 }
33 33
34 KeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor( 34 KeyedService* StartupTaskRunnerServiceFactory::BuildServiceInstanceFor(
35 content::BrowserContext* context) const { 35 content::BrowserContext* context) const {
36 Profile* profile = Profile::FromBrowserContext(context); 36 Profile* profile = Profile::FromBrowserContext(context);
37 return new StartupTaskRunnerService(profile->GetIOTaskRunner()); 37 return new StartupTaskRunnerService(profile->GetIOTaskRunner());
38 } 38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698