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 "chrome/browser/search/suggestions/suggestions_service_factory.h" | 5 #include "chrome/browser/search/suggestions/suggestions_service_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 DependsOn(SigninManagerFactory::GetInstance()); | 50 DependsOn(SigninManagerFactory::GetInstance()); |
51 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 51 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
52 } | 52 } |
53 | 53 |
54 SuggestionsServiceFactory::~SuggestionsServiceFactory() {} | 54 SuggestionsServiceFactory::~SuggestionsServiceFactory() {} |
55 | 55 |
56 KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor( | 56 KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor( |
57 content::BrowserContext* profile) const { | 57 content::BrowserContext* profile) const { |
58 scoped_refptr<base::SequencedTaskRunner> background_task_runner = | 58 scoped_refptr<base::SequencedTaskRunner> background_task_runner = |
59 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | 59 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
60 BrowserThread::GetBlockingPool()->GetSequenceToken()); | 60 base::SequencedWorkerPool::GetSequenceToken()); |
61 | 61 |
62 Profile* the_profile = static_cast<Profile*>(profile); | 62 Profile* the_profile = static_cast<Profile*>(profile); |
63 | 63 |
64 SigninManagerBase* signin_manager = | 64 SigninManagerBase* signin_manager = |
65 SigninManagerFactory::GetForProfile(the_profile); | 65 SigninManagerFactory::GetForProfile(the_profile); |
66 ProfileOAuth2TokenService* token_service = | 66 ProfileOAuth2TokenService* token_service = |
67 ProfileOAuth2TokenServiceFactory::GetForProfile(the_profile); | 67 ProfileOAuth2TokenServiceFactory::GetForProfile(the_profile); |
68 | 68 |
69 scoped_ptr<SuggestionsStore> suggestions_store( | 69 scoped_ptr<SuggestionsStore> suggestions_store( |
70 new SuggestionsStore(the_profile->GetPrefs())); | 70 new SuggestionsStore(the_profile->GetPrefs())); |
(...skipping 17 matching lines...) Expand all Loading... |
88 std::move(suggestions_store), std::move(thumbnail_manager), | 88 std::move(suggestions_store), std::move(thumbnail_manager), |
89 std::move(blacklist_store)); | 89 std::move(blacklist_store)); |
90 } | 90 } |
91 | 91 |
92 void SuggestionsServiceFactory::RegisterProfilePrefs( | 92 void SuggestionsServiceFactory::RegisterProfilePrefs( |
93 user_prefs::PrefRegistrySyncable* registry) { | 93 user_prefs::PrefRegistrySyncable* registry) { |
94 SuggestionsService::RegisterProfilePrefs(registry); | 94 SuggestionsService::RegisterProfilePrefs(registry); |
95 } | 95 } |
96 | 96 |
97 } // namespace suggestions | 97 } // namespace suggestions |
OLD | NEW |