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

Side by Side Diff: chrome/browser/custom_handlers/protocol_handler_registry_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 5 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 8 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
9 #include "chrome/browser/profiles/incognito_helpers.h" 9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11 11
12 // static 12 // static
13 ProtocolHandlerRegistryFactory* ProtocolHandlerRegistryFactory::GetInstance() { 13 ProtocolHandlerRegistryFactory* ProtocolHandlerRegistryFactory::GetInstance() {
14 return Singleton<ProtocolHandlerRegistryFactory>::get(); 14 return base::Singleton<ProtocolHandlerRegistryFactory>::get();
15 } 15 }
16 16
17 // static 17 // static
18 ProtocolHandlerRegistry* ProtocolHandlerRegistryFactory::GetForBrowserContext( 18 ProtocolHandlerRegistry* ProtocolHandlerRegistryFactory::GetForBrowserContext(
19 content::BrowserContext* context) { 19 content::BrowserContext* context) {
20 return static_cast<ProtocolHandlerRegistry*>( 20 return static_cast<ProtocolHandlerRegistry*>(
21 GetInstance()->GetServiceForBrowserContext(context, true)); 21 GetInstance()->GetServiceForBrowserContext(context, true));
22 } 22 }
23 23
24 ProtocolHandlerRegistryFactory::ProtocolHandlerRegistryFactory() 24 ProtocolHandlerRegistryFactory::ProtocolHandlerRegistryFactory()
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // If installing defaults, they must be installed prior calling 60 // If installing defaults, they must be installed prior calling
61 // InitProtocolSettings 61 // InitProtocolSettings
62 registry->InstallDefaultsForChromeOS(); 62 registry->InstallDefaultsForChromeOS();
63 #endif 63 #endif
64 64
65 // Must be called as a part of the creation process. 65 // Must be called as a part of the creation process.
66 registry->InitProtocolSettings(); 66 registry->InitProtocolSettings();
67 67
68 return registry; 68 return registry;
69 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698