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

Side by Side Diff: chrome/browser/invalidation/profile_invalidation_provider_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/invalidation/profile_invalidation_provider_factory.h" 5 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_registry.h" 8 #include "base/prefs/pref_registry.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/invalidation/ticl_profile_settings_provider.h" 10 #include "chrome/browser/invalidation/ticl_profile_settings_provider.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return NULL; 61 return NULL;
62 } 62 }
63 #endif 63 #endif
64 return static_cast<ProfileInvalidationProvider*>( 64 return static_cast<ProfileInvalidationProvider*>(
65 GetInstance()->GetServiceForBrowserContext(profile, true)); 65 GetInstance()->GetServiceForBrowserContext(profile, true));
66 } 66 }
67 67
68 // static 68 // static
69 ProfileInvalidationProviderFactory* 69 ProfileInvalidationProviderFactory*
70 ProfileInvalidationProviderFactory::GetInstance() { 70 ProfileInvalidationProviderFactory::GetInstance() {
71 return Singleton<ProfileInvalidationProviderFactory>::get(); 71 return base::Singleton<ProfileInvalidationProviderFactory>::get();
72 } 72 }
73 73
74 ProfileInvalidationProviderFactory::ProfileInvalidationProviderFactory() 74 ProfileInvalidationProviderFactory::ProfileInvalidationProviderFactory()
75 : BrowserContextKeyedServiceFactory( 75 : BrowserContextKeyedServiceFactory(
76 "InvalidationService", 76 "InvalidationService",
77 BrowserContextDependencyManager::GetInstance()), 77 BrowserContextDependencyManager::GetInstance()),
78 testing_factory_(NULL) { 78 testing_factory_(NULL) {
79 #if !defined(OS_ANDROID) 79 #if !defined(OS_ANDROID)
80 DependsOn(SigninManagerFactory::GetInstance()); 80 DependsOn(SigninManagerFactory::GetInstance());
81 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); 81 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 void ProfileInvalidationProviderFactory::RegisterProfilePrefs( 140 void ProfileInvalidationProviderFactory::RegisterProfilePrefs(
141 user_prefs::PrefRegistrySyncable* registry) { 141 user_prefs::PrefRegistrySyncable* registry) {
142 registry->RegisterBooleanPref( 142 registry->RegisterBooleanPref(
143 prefs::kInvalidationServiceUseGCMChannel, 143 prefs::kInvalidationServiceUseGCMChannel,
144 true); // if no value in prefs, use GCM channel. 144 true); // if no value in prefs, use GCM channel.
145 InvalidatorStorage::RegisterProfilePrefs(registry); 145 InvalidatorStorage::RegisterProfilePrefs(registry);
146 } 146 }
147 147
148 } // namespace invalidation 148 } // namespace invalidation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698