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

Side by Side Diff: chrome/browser/ui/app_list/search/common/webservice_cache_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/app_list/search/common/webservice_cache_factory.h" 5 #include "chrome/browser/ui/app_list/search/common/webservice_cache_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/ui/app_list/search/common/webservice_cache.h" 8 #include "chrome/browser/ui/app_list/search/common/webservice_cache.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
11 namespace app_list { 11 namespace app_list {
12 12
13 // static 13 // static
14 WebserviceCacheFactory* WebserviceCacheFactory::GetInstance() { 14 WebserviceCacheFactory* WebserviceCacheFactory::GetInstance() {
15 return Singleton<WebserviceCacheFactory>::get(); 15 return base::Singleton<WebserviceCacheFactory>::get();
16 } 16 }
17 17
18 // static 18 // static
19 WebserviceCache* WebserviceCacheFactory::GetForBrowserContext( 19 WebserviceCache* WebserviceCacheFactory::GetForBrowserContext(
20 content::BrowserContext* context) { 20 content::BrowserContext* context) {
21 return static_cast<WebserviceCache*>( 21 return static_cast<WebserviceCache*>(
22 GetInstance()->GetServiceForBrowserContext(context, true)); 22 GetInstance()->GetServiceForBrowserContext(context, true));
23 } 23 }
24 24
25 WebserviceCacheFactory::WebserviceCacheFactory() 25 WebserviceCacheFactory::WebserviceCacheFactory()
26 : BrowserContextKeyedServiceFactory( 26 : BrowserContextKeyedServiceFactory(
27 "app_list::WebserviceCache", 27 "app_list::WebserviceCache",
28 BrowserContextDependencyManager::GetInstance()) {} 28 BrowserContextDependencyManager::GetInstance()) {}
29 29
30 WebserviceCacheFactory::~WebserviceCacheFactory() {} 30 WebserviceCacheFactory::~WebserviceCacheFactory() {}
31 31
32 KeyedService* WebserviceCacheFactory::BuildServiceInstanceFor( 32 KeyedService* WebserviceCacheFactory::BuildServiceInstanceFor(
33 content::BrowserContext* context) const { 33 content::BrowserContext* context) const {
34 return new WebserviceCache(context); 34 return new WebserviceCache(context);
35 } 35 }
36 36
37 } // namespace app_list 37 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698