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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 scoped_refptr<base::SequencedTaskRunner> background_task_runner = | 64 scoped_refptr<base::SequencedTaskRunner> background_task_runner = |
65 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | 65 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
66 base::SequencedWorkerPool::GetSequenceToken()); | 66 base::SequencedWorkerPool::GetSequenceToken()); |
67 | 67 |
68 Profile* profile = static_cast<Profile*>(context); | 68 Profile* profile = static_cast<Profile*>(context); |
69 | 69 |
70 SigninManagerBase* signin_manager = | 70 SigninManagerBase* signin_manager = |
71 SigninManagerFactory::GetForProfile(profile); | 71 SigninManagerFactory::GetForProfile(profile); |
72 ProfileOAuth2TokenService* token_service = | 72 ProfileOAuth2TokenService* token_service = |
73 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); | 73 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); |
74 ProfileSyncService* sync_service = | 74 browser_sync::ProfileSyncService* sync_service = |
75 ProfileSyncServiceFactory::GetForProfile(profile); | 75 ProfileSyncServiceFactory::GetForProfile(profile); |
76 | 76 |
77 std::unique_ptr<SuggestionsStore> suggestions_store( | 77 std::unique_ptr<SuggestionsStore> suggestions_store( |
78 new SuggestionsStore(profile->GetPrefs())); | 78 new SuggestionsStore(profile->GetPrefs())); |
79 std::unique_ptr<BlacklistStore> blacklist_store( | 79 std::unique_ptr<BlacklistStore> blacklist_store( |
80 new BlacklistStore(profile->GetPrefs())); | 80 new BlacklistStore(profile->GetPrefs())); |
81 | 81 |
82 std::unique_ptr<leveldb_proto::ProtoDatabaseImpl<ImageData>> db( | 82 std::unique_ptr<leveldb_proto::ProtoDatabaseImpl<ImageData>> db( |
83 new leveldb_proto::ProtoDatabaseImpl<ImageData>(background_task_runner)); | 83 new leveldb_proto::ProtoDatabaseImpl<ImageData>(background_task_runner)); |
84 | 84 |
(...skipping 12 matching lines...) Expand all Loading... |
97 std::move(suggestions_store), std::move(thumbnail_manager), | 97 std::move(suggestions_store), std::move(thumbnail_manager), |
98 std::move(blacklist_store)); | 98 std::move(blacklist_store)); |
99 } | 99 } |
100 | 100 |
101 void SuggestionsServiceFactory::RegisterProfilePrefs( | 101 void SuggestionsServiceFactory::RegisterProfilePrefs( |
102 user_prefs::PrefRegistrySyncable* registry) { | 102 user_prefs::PrefRegistrySyncable* registry) { |
103 SuggestionsService::RegisterProfilePrefs(registry); | 103 SuggestionsService::RegisterProfilePrefs(registry); |
104 } | 104 } |
105 | 105 |
106 } // namespace suggestions | 106 } // namespace suggestions |
OLD | NEW |