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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 base::FilePath database_dir( | 85 base::FilePath database_dir( |
86 profile->GetPath().Append(FILE_PATH_LITERAL("Thumbnails"))); | 86 profile->GetPath().Append(FILE_PATH_LITERAL("Thumbnails"))); |
87 | 87 |
88 std::unique_ptr<ImageFetcherImpl> image_fetcher( | 88 std::unique_ptr<ImageFetcherImpl> image_fetcher( |
89 new ImageFetcherImpl( | 89 new ImageFetcherImpl( |
90 base::MakeUnique<suggestions::ImageDecoderImpl>(), | 90 base::MakeUnique<suggestions::ImageDecoderImpl>(), |
91 profile->GetRequestContext())); | 91 profile->GetRequestContext())); |
92 std::unique_ptr<ImageManager> thumbnail_manager(new ImageManager( | 92 std::unique_ptr<ImageManager> thumbnail_manager(new ImageManager( |
93 std::move(image_fetcher), std::move(db), database_dir, | 93 std::move(image_fetcher), std::move(db), database_dir, |
94 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB))); | 94 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB))); |
95 return new SuggestionsService( | 95 return new SuggestionsService( |
96 signin_manager, token_service, sync_service, profile->GetRequestContext(), | 96 signin_manager, token_service, sync_service, profile->GetRequestContext(), |
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 |