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

Side by Side Diff: components/wifi_sync/wifi_credential_syncable_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 "components/wifi_sync/wifi_credential_syncable_service_factory.h" 5 #include "components/wifi_sync/wifi_credential_syncable_service_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 WifiCredentialSyncableService* 53 WifiCredentialSyncableService*
54 WifiCredentialSyncableServiceFactory::GetForBrowserContext( 54 WifiCredentialSyncableServiceFactory::GetForBrowserContext(
55 content::BrowserContext* browser_context) { 55 content::BrowserContext* browser_context) {
56 return static_cast<WifiCredentialSyncableService*>( 56 return static_cast<WifiCredentialSyncableService*>(
57 GetInstance()->GetServiceForBrowserContext(browser_context, true)); 57 GetInstance()->GetServiceForBrowserContext(browser_context, true));
58 } 58 }
59 59
60 // static 60 // static
61 WifiCredentialSyncableServiceFactory* 61 WifiCredentialSyncableServiceFactory*
62 WifiCredentialSyncableServiceFactory::GetInstance() { 62 WifiCredentialSyncableServiceFactory::GetInstance() {
63 return Singleton<WifiCredentialSyncableServiceFactory>::get(); 63 return base::Singleton<WifiCredentialSyncableServiceFactory>::get();
64 } 64 }
65 65
66 // Private methods. 66 // Private methods.
67 67
68 WifiCredentialSyncableServiceFactory::WifiCredentialSyncableServiceFactory() 68 WifiCredentialSyncableServiceFactory::WifiCredentialSyncableServiceFactory()
69 : BrowserContextKeyedServiceFactory( 69 : BrowserContextKeyedServiceFactory(
70 "WifiCredentialSyncableService", 70 "WifiCredentialSyncableService",
71 BrowserContextDependencyManager::GetInstance()) { 71 BrowserContextDependencyManager::GetInstance()) {
72 } 72 }
73 73
(...skipping 21 matching lines...) Expand all
95 // ChromeBrowserMainPartsChromeos, and destroyed after all 95 // ChromeBrowserMainPartsChromeos, and destroyed after all
96 // KeyedService instances are destroyed. 96 // KeyedService instances are destroyed.
97 chromeos::NetworkHandler* network_handler = chromeos::NetworkHandler::Get(); 97 chromeos::NetworkHandler* network_handler = chromeos::NetworkHandler::Get();
98 return make_scoped_ptr(new WifiConfigDelegateChromeOs( 98 return make_scoped_ptr(new WifiConfigDelegateChromeOs(
99 GetUserHash(context, !ignore_login_state_for_test_), 99 GetUserHash(context, !ignore_login_state_for_test_),
100 network_handler->managed_network_configuration_handler())); 100 network_handler->managed_network_configuration_handler()));
101 } 101 }
102 #endif 102 #endif
103 103
104 } // namespace wifi_sync 104 } // namespace wifi_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698