OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |