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

Side by Side Diff: chrome/browser/ssl/chrome_ssl_host_state_delegate_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/ssl/chrome_ssl_host_state_delegate_factory.h" 5 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/profiles/incognito_helpers.h" 8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" 10 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
(...skipping 23 matching lines...) Expand all
34 // static 34 // static
35 ChromeSSLHostStateDelegate* ChromeSSLHostStateDelegateFactory::GetForProfile( 35 ChromeSSLHostStateDelegate* ChromeSSLHostStateDelegateFactory::GetForProfile(
36 Profile* profile) { 36 Profile* profile) {
37 return static_cast<Service*>(GetInstance()->GetServiceForBrowserContext( 37 return static_cast<Service*>(GetInstance()->GetServiceForBrowserContext(
38 profile, true))->decisions(); 38 profile, true))->decisions();
39 } 39 }
40 40
41 // static 41 // static
42 ChromeSSLHostStateDelegateFactory* 42 ChromeSSLHostStateDelegateFactory*
43 ChromeSSLHostStateDelegateFactory::GetInstance() { 43 ChromeSSLHostStateDelegateFactory::GetInstance() {
44 return Singleton<ChromeSSLHostStateDelegateFactory>::get(); 44 return base::Singleton<ChromeSSLHostStateDelegateFactory>::get();
45 } 45 }
46 46
47 ChromeSSLHostStateDelegateFactory::ChromeSSLHostStateDelegateFactory() 47 ChromeSSLHostStateDelegateFactory::ChromeSSLHostStateDelegateFactory()
48 : BrowserContextKeyedServiceFactory( 48 : BrowserContextKeyedServiceFactory(
49 "ChromeSSLHostStateDelegate", 49 "ChromeSSLHostStateDelegate",
50 BrowserContextDependencyManager::GetInstance()) { 50 BrowserContextDependencyManager::GetInstance()) {
51 } 51 }
52 52
53 ChromeSSLHostStateDelegateFactory::~ChromeSSLHostStateDelegateFactory() { 53 ChromeSSLHostStateDelegateFactory::~ChromeSSLHostStateDelegateFactory() {
54 } 54 }
55 55
56 KeyedService* ChromeSSLHostStateDelegateFactory::BuildServiceInstanceFor( 56 KeyedService* ChromeSSLHostStateDelegateFactory::BuildServiceInstanceFor(
57 content::BrowserContext* profile) const { 57 content::BrowserContext* profile) const {
58 return new Service(static_cast<Profile*>(profile)); 58 return new Service(static_cast<Profile*>(profile));
59 } 59 }
60 60
61 void ChromeSSLHostStateDelegateFactory::RegisterProfilePrefs( 61 void ChromeSSLHostStateDelegateFactory::RegisterProfilePrefs(
62 user_prefs::PrefRegistrySyncable* registry) { 62 user_prefs::PrefRegistrySyncable* registry) {
63 } 63 }
64 64
65 content::BrowserContext* 65 content::BrowserContext*
66 ChromeSSLHostStateDelegateFactory::GetBrowserContextToUse( 66 ChromeSSLHostStateDelegateFactory::GetBrowserContextToUse(
67 content::BrowserContext* context) const { 67 content::BrowserContext* context) const {
68 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 68 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
69 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698