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

Side by Side Diff: chrome/browser/ui/app_list/app_list_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 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/app_list_syncable_service_factory.h" 5 #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/apps/drive/drive_app_provider.h" 10 #include "chrome/browser/apps/drive/drive_app_provider.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // static 25 // static
26 AppListSyncableService* AppListSyncableServiceFactory::GetForProfile( 26 AppListSyncableService* AppListSyncableServiceFactory::GetForProfile(
27 Profile* profile) { 27 Profile* profile) {
28 return static_cast<AppListSyncableService*>( 28 return static_cast<AppListSyncableService*>(
29 GetInstance()->GetServiceForBrowserContext(profile, true)); 29 GetInstance()->GetServiceForBrowserContext(profile, true));
30 } 30 }
31 31
32 // static 32 // static
33 AppListSyncableServiceFactory* AppListSyncableServiceFactory::GetInstance() { 33 AppListSyncableServiceFactory* AppListSyncableServiceFactory::GetInstance() {
34 return Singleton<AppListSyncableServiceFactory>::get(); 34 return base::Singleton<AppListSyncableServiceFactory>::get();
35 } 35 }
36 36
37 // static 37 // static
38 scoped_ptr<KeyedService> AppListSyncableServiceFactory::BuildInstanceFor( 38 scoped_ptr<KeyedService> AppListSyncableServiceFactory::BuildInstanceFor(
39 content::BrowserContext* browser_context) { 39 content::BrowserContext* browser_context) {
40 Profile* profile = static_cast<Profile*>(browser_context); 40 Profile* profile = static_cast<Profile*>(browser_context);
41 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
42 if (chromeos::ProfileHelper::IsSigninProfile(profile)) 42 if (chromeos::ProfileHelper::IsSigninProfile(profile))
43 return NULL; 43 return NULL;
44 #endif 44 #endif
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Start AppListSyncableService early so that the app list positions are 88 // Start AppListSyncableService early so that the app list positions are
89 // available before the app list is opened. 89 // available before the app list is opened.
90 return true; 90 return true;
91 } 91 }
92 92
93 bool AppListSyncableServiceFactory::ServiceIsNULLWhileTesting() const { 93 bool AppListSyncableServiceFactory::ServiceIsNULLWhileTesting() const {
94 return true; 94 return true;
95 } 95 }
96 96
97 } // namespace app_list 97 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698