replace base::MakeUnique with std::make_unique

This commit is contained in:
Shelley Vohr 2018-04-12 08:48:32 -04:00
parent 97fb15ac49
commit b05932310b
No known key found for this signature in database
GPG key ID: F13993A75599653C
28 changed files with 50 additions and 50 deletions

View file

@ -149,7 +149,7 @@ net::URLRequestContextGetter* BrowserContext::CreateRequestContext(
}
std::unique_ptr<net::NetworkDelegate> BrowserContext::CreateNetworkDelegate() {
return base::MakeUnique<NetworkDelegate>();
return std::make_unique<NetworkDelegate>();
}
std::string BrowserContext::GetMediaDeviceIDSalt() {
@ -165,7 +165,7 @@ base::FilePath BrowserContext::GetPath() const {
std::unique_ptr<content::ZoomLevelDelegate>
BrowserContext::CreateZoomLevelDelegate(const base::FilePath& partition_path) {
if (!IsOffTheRecord()) {
return base::MakeUnique<ZoomLevelDelegate>(prefs(), partition_path);
return std::make_unique<ZoomLevelDelegate>(prefs(), partition_path);
}
return std::unique_ptr<content::ZoomLevelDelegate>();
}

View file

@ -307,7 +307,7 @@ int BrowserMainParts::PreCreateThreads() {
l10n_util::GetApplicationLocale(custom_locale_));
// Manage global state of net and other IO thread related.
io_thread_ = base::MakeUnique<IOThread>();
io_thread_ = std::make_unique<IOThread>();
return 0;
}

View file

@ -828,7 +828,7 @@ void InspectableWebContentsImpl::OnURLFetchComplete(
response.SetInteger("statusCode", rh ? rh->response_code() : 200);
{
auto headers = base::MakeUnique<base::DictionaryValue>();
auto headers = std::make_unique<base::DictionaryValue>();
size_t iterator = 0;
std::string name;

View file

@ -23,7 +23,7 @@ std::unique_ptr<base::DictionaryValue> GetConstants() {
std::unique_ptr<base::DictionaryValue> constants = net::GetNetConstants();
// Adding client information to constants dictionary.
auto client_info = base::MakeUnique<base::DictionaryValue>();
auto client_info = std::make_unique<base::DictionaryValue>();
client_info->SetString(
"command_line",
base::CommandLine::ForCurrentProcess()->GetCommandLineString());

View file

@ -220,7 +220,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
url_request_context_->cookie_store()->AddCallbackForAllChanges(
base::Bind(&URLRequestContextGetter::OnCookieChanged, this));
storage_->set_channel_id_service(base::MakeUnique<net::ChannelIDService>(
storage_->set_channel_id_service(std::make_unique<net::ChannelIDService>(
new net::DefaultChannelIDStore(nullptr)));
storage_->set_http_user_agent_settings(
@ -306,10 +306,10 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
storage_->set_http_server_properties(std::move(server_properties));
std::unique_ptr<net::MultiLogCTVerifier> ct_verifier =
base::MakeUnique<net::MultiLogCTVerifier>();
std::make_unique<net::MultiLogCTVerifier>();
ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs());
storage_->set_cert_transparency_verifier(std::move(ct_verifier));
storage_->set_ct_policy_enforcer(base::MakeUnique<net::CTPolicyEnforcer>());
storage_->set_ct_policy_enforcer(std::make_unique<net::CTPolicyEnforcer>());
net::HttpNetworkSession::Params network_session_params;
network_session_params.ignore_certificate_errors = false;
@ -346,7 +346,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
backend.reset(delegate_->CreateHttpCacheBackendFactory(base_path_));
}
storage_->set_http_transaction_factory(base::MakeUnique<net::HttpCache>(
storage_->set_http_transaction_factory(std::make_unique<net::HttpCache>(
content::CreateDevToolsNetworkTransactionFactory(
http_network_session_.get()),
std::move(backend), false));

View file

@ -89,7 +89,7 @@ void ZoomLevelDelegate::OnZoomLevelChanged(
if (!host_zoom_dictionaries->GetDictionary(partition_key_,
&host_zoom_dictionary)) {
host_zoom_dictionary = host_zoom_dictionaries->SetDictionary(
partition_key_, base::MakeUnique<base::DictionaryValue>());
partition_key_, std::make_unique<base::DictionaryValue>());
}
if (modification_is_removal)