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

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

Issue 399493002: Remove many instances of CreateBooleanValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 2cb883f9469fdb8a96e644cd38020475df5fc8f8..ae3d50f1a30ac3e8ddc4d2ed085636232f61f545 100644
--- a/chrome/browser/prefs/command_line_pref_store.cc
+++ b/chrome/browser/prefs/command_line_pref_store.cc
@@ -122,9 +122,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)) {
- base::Value* value = base::Value::CreateBooleanValue(
- boolean_switch_map_[i].set_value);
- SetValue(boolean_switch_map_[i].preference_path, value);
+ SetValue(boolean_switch_map_[i].preference_path,
+ new base::FundamentalValue(boolean_switch_map_[i].set_value));
}
}
}
@@ -168,8 +167,6 @@ void CommandLinePrefStore::ApplySSLSwitches() {
}
void CommandLinePrefStore::ApplyBackgroundModeSwitches() {
- if (command_line_->HasSwitch(switches::kDisableExtensions)) {
- base::Value* value = base::Value::CreateBooleanValue(false);
- SetValue(prefs::kBackgroundModeEnabled, value);
- }
+ if (command_line_->HasSwitch(switches::kDisableExtensions))
+ SetValue(prefs::kBackgroundModeEnabled, new base::FundamentalValue(false));
}

Powered by Google App Engine
This is Rietveld 408576698