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_test_util.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_test_util.cc
diff --git a/ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc b/ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc
index b53ab598697afa248e87f57f7bf41f447fde346e..f530e2336de27fb269b75b7da87aa2b3dfdd39b8 100644
--- a/ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc
+++ b/ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc
@@ -5,6 +5,7 @@
#include "ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "components/browser_sync/browser/profile_sync_service_mock.h"
#include "components/browser_sync/browser/profile_sync_test_util.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
@@ -18,18 +19,18 @@
#include "ios/web/public/web_thread.h"
ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest(
- scoped_ptr<sync_driver::SyncClient> sync_client,
+ std::unique_ptr<sync_driver::SyncClient> sync_client,
ios::ChromeBrowserState* browser_state) {
ProfileSyncService::InitParams init_params;
- init_params.signin_wrapper = make_scoped_ptr(new SigninManagerWrapper(
+ init_params.signin_wrapper = base::WrapUnique(new SigninManagerWrapper(
ios::SigninManagerFactory::GetForBrowserState(browser_state)));
init_params.oauth2_token_service =
OAuth2TokenServiceFactory::GetForBrowserState(browser_state);
init_params.start_behavior = ProfileSyncService::MANUAL_START;
init_params.sync_client =
sync_client ? std::move(sync_client)
- : make_scoped_ptr(new IOSChromeSyncClient(browser_state));
+ : base::WrapUnique(new IOSChromeSyncClient(browser_state));
init_params.network_time_update_callback =
base::Bind(&browser_sync::EmptyNetworkTimeUpdate);
init_params.base_directory = browser_state->GetStatePath();
@@ -45,9 +46,9 @@ ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest(
return init_params;
}
-scoped_ptr<KeyedService> BuildMockProfileSyncService(
+std::unique_ptr<KeyedService> BuildMockProfileSyncService(
web::BrowserState* context) {
- return make_scoped_ptr(
+ return base::WrapUnique(
new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest(
nullptr, ios::ChromeBrowserState::FromBrowserState(context))));
}
« no previous file with comments | « ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.h ('k') | ios/chrome/browser/sync/ios_chrome_sync_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698