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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased Created 3 years, 6 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 6461d76826efa245ffa8394dd215028ea1f5938e..c998d12bcab159fb0470d0f82921f77844d7ed53 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -133,6 +133,7 @@
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
+#include "components/content_settings/core/common/content_settings_utils.h"
#include "components/dom_distiller/core/dom_distiller_switches.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/error_page/common/error_page_switches.h"
@@ -755,25 +756,19 @@ float GetDeviceScaleAdjustment() {
void GetGuestViewDefaultContentSettingRules(
bool incognito,
RendererContentSettingRules* rules) {
- rules->image_rules.push_back(
- ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTING_ALLOW,
- std::string(),
- incognito));
-
- rules->script_rules.push_back(
- ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTING_ALLOW,
- std::string(),
- incognito));
- rules->autoplay_rules.push_back(
- ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTING_ALLOW,
- std::string(),
- incognito));
+ rules->image_rules.push_back(ContentSettingPatternSource(
+ ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
+ content_settings::ContentSettingToValue(CONTENT_SETTING_ALLOW),
+ std::string(), incognito));
+
+ rules->script_rules.push_back(ContentSettingPatternSource(
+ ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
+ content_settings::ContentSettingToValue(CONTENT_SETTING_ALLOW),
+ std::string(), incognito));
+ rules->autoplay_rules.push_back(ContentSettingPatternSource(
+ ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
+ content_settings::ContentSettingToValue(CONTENT_SETTING_ALLOW),
+ std::string(), incognito));
}
AppLoadedInTabSource ClassifyAppLoadedInTabSource(

Powered by Google App Engine
This is Rietveld 408576698