Index: ios/chrome/browser/suggestions/suggestions_service_factory.mm |
diff --git a/ios/chrome/browser/suggestions/suggestions_service_factory.mm b/ios/chrome/browser/suggestions/suggestions_service_factory.mm |
index 52e03d0dbdcc6459249547683ffa85823e9a9fbe..b771df486335fba4df62daf1503ee748f87f7454 100644 |
--- a/ios/chrome/browser/suggestions/suggestions_service_factory.mm |
+++ b/ios/chrome/browser/suggestions/suggestions_service_factory.mm |
@@ -7,6 +7,7 @@ |
#include <utility> |
#include "base/files/file_path.h" |
+#include "base/memory/ptr_util.h" |
#include "base/memory/singleton.h" |
#include "base/sequenced_task_runner.h" |
#include "base/threading/sequenced_worker_pool.h" |
@@ -58,7 +59,8 @@ SuggestionsServiceFactory::SuggestionsServiceFactory() |
SuggestionsServiceFactory::~SuggestionsServiceFactory() { |
} |
-scoped_ptr<KeyedService> SuggestionsServiceFactory::BuildServiceInstanceFor( |
+std::unique_ptr<KeyedService> |
+SuggestionsServiceFactory::BuildServiceInstanceFor( |
web::BrowserState* context) const { |
base::SequencedWorkerPool* sequenced_worker_pool = |
web::WebThread::GetBlockingPool(); |
@@ -76,18 +78,18 @@ scoped_ptr<KeyedService> SuggestionsServiceFactory::BuildServiceInstanceFor( |
IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); |
base::FilePath database_dir( |
browser_state->GetStatePath().Append(kThumbnailDirectory)); |
- scoped_ptr<SuggestionsStore> suggestions_store( |
+ std::unique_ptr<SuggestionsStore> suggestions_store( |
new SuggestionsStore(browser_state->GetPrefs())); |
- scoped_ptr<BlacklistStore> blacklist_store( |
+ std::unique_ptr<BlacklistStore> blacklist_store( |
new BlacklistStore(browser_state->GetPrefs())); |
- scoped_ptr<leveldb_proto::ProtoDatabaseImpl<ImageData>> db( |
+ std::unique_ptr<leveldb_proto::ProtoDatabaseImpl<ImageData>> db( |
new leveldb_proto::ProtoDatabaseImpl<ImageData>(background_task_runner)); |
- scoped_ptr<ImageFetcher> image_fetcher(new ImageFetcherImpl( |
+ std::unique_ptr<ImageFetcher> image_fetcher(new ImageFetcherImpl( |
browser_state->GetRequestContext(), sequenced_worker_pool)); |
- scoped_ptr<ImageManager> thumbnail_manager(new ImageManager( |
+ std::unique_ptr<ImageManager> thumbnail_manager(new ImageManager( |
std::move(image_fetcher), std::move(db), database_dir, |
web::WebThread::GetTaskRunnerForThread(web::WebThread::DB))); |
- return make_scoped_ptr(new SuggestionsService( |
+ return base::WrapUnique(new SuggestionsService( |
signin_manager, token_service, sync_service, |
browser_state->GetRequestContext(), std::move(suggestions_store), |
std::move(thumbnail_manager), std::move(blacklist_store))); |