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

Unified Diff: chrome/browser/content_settings/host_content_settings_map.cc

Issue 385263004: Get rid of some uses of CreateIntegerValue (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/content_settings/host_content_settings_map.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc
index 27427aef4f085b69b2a1b47d385c20a309dce44f..e8088217975b5dcfc6b58c449858284bd79adf59 100644
--- a/chrome/browser/content_settings/host_content_settings_map.cc
+++ b/chrome/browser/content_settings/host_content_settings_map.cc
@@ -259,7 +259,7 @@ void HostContentSettingsMap::SetDefaultContentSetting(
base::Value* value = NULL;
if (setting != CONTENT_SETTING_DEFAULT)
- value = base::Value::CreateIntegerValue(setting);
+ value = new base::FundamentalValue(setting);
SetWebsiteSetting(
ContentSettingsPattern::Wildcard(),
ContentSettingsPattern::Wildcard(),
@@ -309,7 +309,7 @@ void HostContentSettingsMap::SetContentSetting(
base::Value* value = NULL;
if (setting != CONTENT_SETTING_DEFAULT)
- value = base::Value::CreateIntegerValue(setting);
+ value = new base::FundamentalValue(setting);
SetWebsiteSetting(primary_pattern,
secondary_pattern,
content_type,
@@ -563,8 +563,7 @@ void HostContentSettingsMap::MigrateObsoleteClearOnExitPref() {
it->secondary_pattern,
CONTENT_SETTINGS_TYPE_COOKIES,
std::string(),
- base::Value::CreateIntegerValue(
- CONTENT_SETTING_SESSION_ONLY));
+ new base::FundamentalValue(CONTENT_SETTING_SESSION_ONLY));
}
prefs_->SetBoolean(prefs::kContentSettingsClearOnExitMigrated, true);
@@ -665,7 +664,7 @@ base::Value* HostContentSettingsMap::GetWebsiteSetting(
info->primary_pattern = ContentSettingsPattern::Wildcard();
info->secondary_pattern = ContentSettingsPattern::Wildcard();
}
- return base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW);
+ return new base::FundamentalValue(CONTENT_SETTING_ALLOW);
}
ContentSettingsPattern* primary_pattern = NULL;

Powered by Google App Engine
This is Rietveld 408576698