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

Side by Side Diff: ios/chrome/browser/suggestions/suggestions_service_factory.mm

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 "ios/chrome/browser/suggestions/suggestions_service_factory.h" 5 #include "ios/chrome/browser/suggestions/suggestions_service_factory.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 10 matching lines...) Expand all
21 #include "ios/web/public/web_thread.h" 21 #include "ios/web/public/web_thread.h"
22 22
23 namespace suggestions { 23 namespace suggestions {
24 namespace { 24 namespace {
25 const base::FilePath::CharType kThumbnailDirectory[] = 25 const base::FilePath::CharType kThumbnailDirectory[] =
26 FILE_PATH_LITERAL("Thumbnail"); 26 FILE_PATH_LITERAL("Thumbnail");
27 } 27 }
28 28
29 // static 29 // static
30 SuggestionsServiceFactory* SuggestionsServiceFactory::GetInstance() { 30 SuggestionsServiceFactory* SuggestionsServiceFactory::GetInstance() {
31 return Singleton<SuggestionsServiceFactory>::get(); 31 return base::Singleton<SuggestionsServiceFactory>::get();
32 } 32 }
33 33
34 // static 34 // static
35 SuggestionsService* SuggestionsServiceFactory::GetForBrowserState( 35 SuggestionsService* SuggestionsServiceFactory::GetForBrowserState(
36 ios::ChromeBrowserState* browser_state) { 36 ios::ChromeBrowserState* browser_state) {
37 return static_cast<SuggestionsService*>( 37 return static_cast<SuggestionsService*>(
38 GetInstance()->GetServiceForBrowserState(browser_state, true)); 38 GetInstance()->GetServiceForBrowserState(browser_state, true));
39 } 39 }
40 40
41 SuggestionsServiceFactory::SuggestionsServiceFactory() 41 SuggestionsServiceFactory::SuggestionsServiceFactory()
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 browser_state->GetRequestContext(), suggestions_store.Pass(), 75 browser_state->GetRequestContext(), suggestions_store.Pass(),
76 thumbnail_manager.Pass(), blacklist_store.Pass())); 76 thumbnail_manager.Pass(), blacklist_store.Pass()));
77 } 77 }
78 78
79 void SuggestionsServiceFactory::RegisterBrowserStatePrefs( 79 void SuggestionsServiceFactory::RegisterBrowserStatePrefs(
80 user_prefs::PrefRegistrySyncable* registry) { 80 user_prefs::PrefRegistrySyncable* registry) {
81 SuggestionsService::RegisterProfilePrefs(registry); 81 SuggestionsService::RegisterProfilePrefs(registry);
82 } 82 }
83 83
84 } // namespace suggestions 84 } // namespace suggestions
OLDNEW
« no previous file with comments | « ios/chrome/browser/suggestions/suggestions_service_factory.h ('k') | ios/chrome/browser/sync/sync_setup_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698