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

Unified Diff: components/content_settings/core/browser/host_content_settings_map.h

Issue 2510363003: Only activate radio buttons in ContentSettingsBubble for valid content settings. This prevents fail… (Closed)
Patch Set: rebase Created 4 years, 1 month 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: components/content_settings/core/browser/host_content_settings_map.h
diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h
index bf174b514bc5e24004205f8c52d2b27ba74652b0..e970af8c6c6ab6593d78cb5d184013b8508f416e 100644
--- a/components/content_settings/core/browser/host_content_settings_map.h
+++ b/components/content_settings/core/browser/host_content_settings_map.h
@@ -196,6 +196,13 @@ class HostContentSettingsMap : public content_settings::Observer,
const std::string& resource_identifier,
std::unique_ptr<base::Value> value);
+ // Check if a call to SetNarrowestContentSetting would succeed or if it would
+ // fail because of an invalid pattern.
+ bool CanSetNarrowestContentSetting(
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType type) const;
+
// Sets the most specific rule that currently defines the setting for the
// given content type. TODO(raymes): Remove this once all content settings
// are scoped to origin scope. There is no scope more narrow than origin
@@ -364,6 +371,11 @@ class HostContentSettingsMap : public content_settings::Observer,
const std::string& resource_identifier,
content_settings::SettingInfo* info) const;
+ content_settings::PatternPair GetNarrowestPatterns(
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType type) const;
+
static std::unique_ptr<base::Value> GetContentSettingValueAndPatterns(
const content_settings::ProviderInterface* provider,
const GURL& primary_url,

Powered by Google App Engine
This is Rietveld 408576698