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

Side by Side Diff: ios/chrome/browser/web_data_service_factory.cc

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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/autofill/autofill_client_ios.mm ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/chrome/browser/web_data_service_factory.h" 5 #include "ios/chrome/browser/web_data_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 "WebDataService", 90 "WebDataService",
91 BrowserStateDependencyManager::GetInstance()) { 91 BrowserStateDependencyManager::GetInstance()) {
92 } 92 }
93 93
94 WebDataServiceFactory::~WebDataServiceFactory() { 94 WebDataServiceFactory::~WebDataServiceFactory() {
95 } 95 }
96 96
97 std::unique_ptr<KeyedService> WebDataServiceFactory::BuildServiceInstanceFor( 97 std::unique_ptr<KeyedService> WebDataServiceFactory::BuildServiceInstanceFor(
98 web::BrowserState* context) const { 98 web::BrowserState* context) const {
99 const base::FilePath& browser_state_path = context->GetStatePath(); 99 const base::FilePath& browser_state_path = context->GetStatePath();
100 return base::WrapUnique(new WebDataServiceWrapper( 100 return base::MakeUnique<WebDataServiceWrapper>(
101 browser_state_path, GetApplicationContext()->GetApplicationLocale(), 101 browser_state_path, GetApplicationContext()->GetApplicationLocale(),
102 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI), 102 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI),
103 web::WebThread::GetTaskRunnerForThread(web::WebThread::DB), 103 web::WebThread::GetTaskRunnerForThread(web::WebThread::DB),
104 ios::sync_start_util::GetFlareForSyncableService(browser_state_path), 104 ios::sync_start_util::GetFlareForSyncableService(browser_state_path),
105 &DoNothingOnErrorCallback)); 105 &DoNothingOnErrorCallback);
106 } 106 }
107 107
108 web::BrowserState* WebDataServiceFactory::GetBrowserStateToUse( 108 web::BrowserState* WebDataServiceFactory::GetBrowserStateToUse(
109 web::BrowserState* context) const { 109 web::BrowserState* context) const {
110 return GetBrowserStateRedirectedInIncognito(context); 110 return GetBrowserStateRedirectedInIncognito(context);
111 } 111 }
112 112
113 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { 113 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const {
114 return true; 114 return true;
115 } 115 }
116 116
117 } // namespace ios 117 } // namespace ios
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/autofill/autofill_client_ios.mm ('k') | ios/crnet/crnet_environment.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698