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

Unified Diff: ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc

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/sync/ios_chrome_profile_sync_service_factory.cc
diff --git a/ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc b/ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc
index 361b57d5ae38ee6649d63d3ee7e319aaabb37fa7..4c8a4a0a3cc1cb5738480472b4aa913f216b7875 100644
--- a/ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc
+++ b/ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h"
#include "base/time/time.h"
#include "components/browser_sync/browser/profile_sync_service.h"
@@ -108,7 +109,7 @@ IOSChromeProfileSyncServiceFactory::IOSChromeProfileSyncServiceFactory()
IOSChromeProfileSyncServiceFactory::~IOSChromeProfileSyncServiceFactory() {}
-scoped_ptr<KeyedService>
+std::unique_ptr<KeyedService>
IOSChromeProfileSyncServiceFactory::BuildServiceInstanceFor(
web::BrowserState* context) const {
ios::ChromeBrowserState* browser_state =
@@ -128,12 +129,12 @@ IOSChromeProfileSyncServiceFactory::BuildServiceInstanceFor(
ProfileSyncService::InitParams init_params;
init_params.signin_wrapper =
- make_scoped_ptr(new SigninManagerWrapper(signin));
+ base::WrapUnique(new SigninManagerWrapper(signin));
init_params.oauth2_token_service =
OAuth2TokenServiceFactory::GetForBrowserState(browser_state);
init_params.start_behavior = ProfileSyncService::MANUAL_START;
init_params.sync_client =
- make_scoped_ptr(new IOSChromeSyncClient(browser_state));
+ base::WrapUnique(new IOSChromeSyncClient(browser_state));
init_params.network_time_update_callback = base::Bind(&UpdateNetworkTime);
init_params.base_directory = browser_state->GetStatePath();
init_params.url_request_context = browser_state->GetRequestContext();
@@ -145,7 +146,7 @@ IOSChromeProfileSyncServiceFactory::BuildServiceInstanceFor(
web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE);
init_params.blocking_pool = web::WebThread::GetBlockingPool();
- auto pss = make_scoped_ptr(new ProfileSyncService(std::move(init_params)));
+ auto pss = base::WrapUnique(new ProfileSyncService(std::move(init_params)));
// Will also initialize the sync client.
pss->Initialize();

Powered by Google App Engine
This is Rietveld 408576698