Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: ios/chrome/browser/suggestions/suggestions_service_factory.mm

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)));
« no previous file with comments | « ios/chrome/browser/suggestions/suggestions_service_factory.h ('k') | ios/chrome/browser/sync/fake_sync_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698