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

Unified Diff: ios/chrome/browser/browser_state/test_chrome_browser_state.mm

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/browser_state/test_chrome_browser_state.mm
diff --git a/ios/chrome/browser/browser_state/test_chrome_browser_state.mm b/ios/chrome/browser/browser_state/test_chrome_browser_state.mm
index 88f840bddf9d6af431ad79eb4dcbc94162b42918..1e5dd33a4fce4a0221580300ac34128f77e84d71 100644
--- a/ios/chrome/browser/browser_state/test_chrome_browser_state.mm
+++ b/ios/chrome/browser/browser_state/test_chrome_browser_state.mm
@@ -52,10 +52,10 @@ namespace {
std::unique_ptr<KeyedService> BuildHistoryService(web::BrowserState* context) {
ios::ChromeBrowserState* browser_state =
ios::ChromeBrowserState::FromBrowserState(context);
- return base::WrapUnique(new history::HistoryService(
+ return base::MakeUnique<history::HistoryService>(
base::WrapUnique(new HistoryClientImpl(
ios::BookmarkModelFactory::GetForBrowserState(browser_state))),
- nullptr));
+ nullptr);
}
std::unique_ptr<KeyedService> BuildBookmarkModel(web::BrowserState* context) {
@@ -63,7 +63,7 @@ std::unique_ptr<KeyedService> BuildBookmarkModel(web::BrowserState* context) {
ios::ChromeBrowserState::FromBrowserState(context);
std::unique_ptr<bookmarks::BookmarkModel> bookmark_model(
new bookmarks::BookmarkModel(
- base::WrapUnique(new BookmarkClientImpl(browser_state))));
+ base::MakeUnique<BookmarkClientImpl>(browser_state)));
bookmark_model->Load(
browser_state->GetPrefs(),
browser_state->GetStatePath(), browser_state->GetIOTaskRunner(),
@@ -79,12 +79,12 @@ void NotReachedErrorCallback(WebDataServiceWrapper::ErrorType,
std::unique_ptr<KeyedService> BuildWebDataService(web::BrowserState* context) {
const base::FilePath& browser_state_path = context->GetStatePath();
- return base::WrapUnique(new WebDataServiceWrapper(
+ return base::MakeUnique<WebDataServiceWrapper>(
browser_state_path, GetApplicationContext()->GetApplicationLocale(),
web::WebThread::GetTaskRunnerForThread(web::WebThread::UI),
web::WebThread::GetTaskRunnerForThread(web::WebThread::DB),
ios::sync_start_util::GetFlareForSyncableService(browser_state_path),
- &NotReachedErrorCallback));
+ &NotReachedErrorCallback);
}
base::FilePath CreateTempBrowserStateDir(base::ScopedTempDir* temp_dir) {

Powered by Google App Engine
This is Rietveld 408576698