| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); | 57 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); |
| 58 DependsOn(ProfileSyncServiceFactory::GetInstance()); | 58 DependsOn(ProfileSyncServiceFactory::GetInstance()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 SuggestionsServiceFactory::~SuggestionsServiceFactory() {} | 61 SuggestionsServiceFactory::~SuggestionsServiceFactory() {} |
| 62 | 62 |
| 63 KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor( | 63 KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor( |
| 64 content::BrowserContext* context) const { | 64 content::BrowserContext* context) const { |
| 65 scoped_refptr<base::SequencedTaskRunner> background_task_runner = | 65 scoped_refptr<base::SequencedTaskRunner> background_task_runner = |
| 66 base::CreateSequencedTaskRunnerWithTraits( | 66 base::CreateSequencedTaskRunnerWithTraits( |
| 67 base::TaskTraits().MayBlock().WithPriority( | 67 {base::MayBlock(), base::TaskPriority::BACKGROUND}); |
| 68 base::TaskPriority::BACKGROUND)); | |
| 69 | 68 |
| 70 Profile* profile = static_cast<Profile*>(context); | 69 Profile* profile = static_cast<Profile*>(context); |
| 71 | 70 |
| 72 SigninManagerBase* signin_manager = | 71 SigninManagerBase* signin_manager = |
| 73 SigninManagerFactory::GetForProfile(profile); | 72 SigninManagerFactory::GetForProfile(profile); |
| 74 ProfileOAuth2TokenService* token_service = | 73 ProfileOAuth2TokenService* token_service = |
| 75 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); | 74 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); |
| 76 browser_sync::ProfileSyncService* sync_service = | 75 browser_sync::ProfileSyncService* sync_service = |
| 77 ProfileSyncServiceFactory::GetForProfile(profile); | 76 ProfileSyncServiceFactory::GetForProfile(profile); |
| 78 | 77 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 99 std::move(suggestions_store), std::move(thumbnail_manager), | 98 std::move(suggestions_store), std::move(thumbnail_manager), |
| 100 std::move(blacklist_store)); | 99 std::move(blacklist_store)); |
| 101 } | 100 } |
| 102 | 101 |
| 103 void SuggestionsServiceFactory::RegisterProfilePrefs( | 102 void SuggestionsServiceFactory::RegisterProfilePrefs( |
| 104 user_prefs::PrefRegistrySyncable* registry) { | 103 user_prefs::PrefRegistrySyncable* registry) { |
| 105 SuggestionsServiceImpl::RegisterProfilePrefs(registry); | 104 SuggestionsServiceImpl::RegisterProfilePrefs(registry); |
| 106 } | 105 } |
| 107 | 106 |
| 108 } // namespace suggestions | 107 } // namespace suggestions |
| OLD | NEW |