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

Unified Diff: chrome/browser/prefs/command_line_pref_store.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky Created 4 years, 3 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: chrome/browser/prefs/command_line_pref_store.cc
diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc
index 57439350ebbd4e3da921188fd2613e16350a6fa1..8fed000a1aae0b0b214651509c32a02b403c3c87 100644
--- a/chrome/browser/prefs/command_line_pref_store.cc
+++ b/chrome/browser/prefs/command_line_pref_store.cc
@@ -115,9 +115,9 @@ void CommandLinePrefStore::ApplySimpleSwitches() {
for (size_t i = 0; i < arraysize(string_switch_map_); ++i) {
if (command_line_->HasSwitch(string_switch_map_[i].switch_name)) {
SetValue(string_switch_map_[i].preference_path,
- base::WrapUnique(
- new base::StringValue(command_line_->GetSwitchValueASCII(
- string_switch_map_[i].switch_name))),
+ base::MakeUnique<base::StringValue>(
+ command_line_->GetSwitchValueASCII(
+ string_switch_map_[i].switch_name)),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
}
@@ -126,9 +126,9 @@ void CommandLinePrefStore::ApplySimpleSwitches() {
if (command_line_->HasSwitch(path_switch_map_[i].switch_name)) {
SetValue(
path_switch_map_[i].preference_path,
- base::WrapUnique(new base::StringValue(
+ base::MakeUnique<base::StringValue>(
command_line_->GetSwitchValuePath(path_switch_map_[i].switch_name)
- .value())),
+ .value()),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
}
@@ -145,7 +145,7 @@ void CommandLinePrefStore::ApplySimpleSwitches() {
continue;
}
SetValue(integer_switch_map_[i].preference_path,
- base::WrapUnique(new base::FundamentalValue(int_value)),
+ base::MakeUnique<base::FundamentalValue>(int_value),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
}
@@ -153,8 +153,8 @@ void CommandLinePrefStore::ApplySimpleSwitches() {
for (size_t i = 0; i < arraysize(boolean_switch_map_); ++i) {
if (command_line_->HasSwitch(boolean_switch_map_[i].switch_name)) {
SetValue(boolean_switch_map_[i].preference_path,
- base::WrapUnique(new base::FundamentalValue(
- boolean_switch_map_[i].set_value)),
+ base::MakeUnique<base::FundamentalValue>(
+ boolean_switch_map_[i].set_value),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
}
@@ -202,7 +202,7 @@ void CommandLinePrefStore::ApplySSLSwitches() {
void CommandLinePrefStore::ApplyBackgroundModeSwitches() {
if (command_line_->HasSwitch(switches::kDisableExtensions)) {
SetValue(prefs::kBackgroundModeEnabled,
- base::WrapUnique(new base::FundamentalValue(false)),
+ base::MakeUnique<base::FundamentalValue>(false),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
}
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/prefs/profile_pref_store_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698