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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry.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/custom_handlers/protocol_handler_registry.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc
index 0ad768d9177c35327f9b59f9fb99ce910dbedd79..7ed6e287ab7e246f8c6ec849607090bc3cca9240 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc
@@ -739,12 +739,11 @@ void ProtocolHandlerRegistry::Save() {
scoped_ptr<base::Value> registered_protocol_handlers(
EncodeRegisteredHandlers());
scoped_ptr<base::Value> ignored_protocol_handlers(EncodeIgnoredHandlers());
- scoped_ptr<base::Value> enabled(base::Value::CreateBooleanValue(enabled_));
profile_->GetPrefs()->Set(prefs::kRegisteredProtocolHandlers,
*registered_protocol_handlers);
profile_->GetPrefs()->Set(prefs::kIgnoredProtocolHandlers,
*ignored_protocol_handlers);
- profile_->GetPrefs()->Set(prefs::kCustomHandlersEnabled, *enabled);
+ profile_->GetPrefs()->SetBoolean(prefs::kCustomHandlersEnabled, enabled_);
}
const ProtocolHandlerRegistry::ProtocolHandlerList*
@@ -800,7 +799,7 @@ base::Value* ProtocolHandlerRegistry::EncodeRegisteredHandlers() {
j != i->second.end(); ++j) {
base::DictionaryValue* encoded = j->Encode();
if (IsDefault(*j)) {
- encoded->Set("default", base::Value::CreateBooleanValue(true));
+ encoded->Set("default", new base::FundamentalValue(true));
}
protocol_handlers->Append(encoded);
}

Powered by Google App Engine
This is Rietveld 408576698