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

Side by Side Diff: chrome/browser/apps/per_app_settings_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/apps/per_app_settings_service_factory.h" 5 #include "chrome/browser/apps/per_app_settings_service_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/apps/per_app_settings_service.h" 8 #include "chrome/browser/apps/per_app_settings_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 #include "extensions/browser/extensions_browser_client.h" 10 #include "extensions/browser/extensions_browser_client.h"
11 11
12 // static 12 // static
13 PerAppSettingsServiceFactory* PerAppSettingsServiceFactory::GetInstance() { 13 PerAppSettingsServiceFactory* PerAppSettingsServiceFactory::GetInstance() {
14 return Singleton<PerAppSettingsServiceFactory>::get(); 14 return base::Singleton<PerAppSettingsServiceFactory>::get();
15 } 15 }
16 16
17 // static 17 // static
18 PerAppSettingsService* PerAppSettingsServiceFactory::GetForBrowserContext( 18 PerAppSettingsService* PerAppSettingsServiceFactory::GetForBrowserContext(
19 content::BrowserContext* browser_context) { 19 content::BrowserContext* browser_context) {
20 return static_cast<PerAppSettingsService*>( 20 return static_cast<PerAppSettingsService*>(
21 GetInstance()->GetServiceForBrowserContext( 21 GetInstance()->GetServiceForBrowserContext(
22 browser_context, true /* create */)); 22 browser_context, true /* create */));
23 } 23 }
24 24
(...skipping 12 matching lines...) Expand all
37 37
38 bool PerAppSettingsServiceFactory::ServiceIsCreatedWithBrowserContext() const { 38 bool PerAppSettingsServiceFactory::ServiceIsCreatedWithBrowserContext() const {
39 return false; 39 return false;
40 } 40 }
41 41
42 content::BrowserContext* PerAppSettingsServiceFactory::GetBrowserContextToUse( 42 content::BrowserContext* PerAppSettingsServiceFactory::GetBrowserContextToUse(
43 content::BrowserContext* context) const { 43 content::BrowserContext* context) const {
44 return extensions::ExtensionsBrowserClient::Get()-> 44 return extensions::ExtensionsBrowserClient::Get()->
45 GetOriginalContext(context); 45 GetOriginalContext(context);
46 } 46 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/per_app_settings_service_factory.h ('k') | chrome/browser/apps/shortcut_manager_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698