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

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

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: nasko comments 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: components/content_settings/core/browser/content_settings_utils.h
diff --git a/components/content_settings/core/browser/content_settings_utils.h b/components/content_settings/core/browser/content_settings_utils.h
index fdcaf0bc6faab12d3b1f24108bf4f71231046c69..bef0ba70f53e6f2469f951a0c86b7c4682a826ce 100644
--- a/components/content_settings/core/browser/content_settings_utils.h
+++ b/components/content_settings/core/browser/content_settings_utils.h
@@ -14,10 +14,6 @@
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/content_settings/core/common/content_settings_types.h"
-namespace base {
-class Value;
-}
-
class HostContentSettingsMap;
namespace content_settings {
@@ -58,25 +54,12 @@ std::string ContentSettingToString(ContentSetting setting);
// Returns true if |name| specifies a valid content setting, false otherwise.
bool ContentSettingFromString(const std::string& name, ContentSetting* setting);
-// Converts |Value| to |ContentSetting|.
-ContentSetting ValueToContentSetting(const base::Value* value);
-
-// Converts a |Value| to a |ContentSetting|. Returns true if |value| encodes
-// a valid content setting, false otherwise. Note that |CONTENT_SETTING_DEFAULT|
-// is encoded as a NULL value, so it is not allowed as an integer value.
-bool ParseContentSettingValue(const base::Value* value,
- ContentSetting* setting);
-
PatternPair ParsePatternString(const std::string& pattern_str);
std::string CreatePatternString(
const ContentSettingsPattern& item_pattern,
const ContentSettingsPattern& top_level_frame_pattern);
-// Returns a |base::Value*| representation of |setting| if |setting| is
-// a valid content setting. Otherwise, returns a nullptr.
-std::unique_ptr<base::Value> ContentSettingToValue(ContentSetting setting);
-
// Populates |rules| with content setting rules for content types that are
// handled by the renderer.
void GetRendererContentSettingRules(const HostContentSettingsMap* map,

Powered by Google App Engine
This is Rietveld 408576698