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

Unified Diff: chrome/browser/content_settings/content_settings_utils.h

Issue 670953006: Componentize HostContentSettingsMap and content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win64 suppress warnings Created 6 years, 2 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/content_settings_utils.h
diff --git a/chrome/browser/content_settings/content_settings_utils.h b/chrome/browser/content_settings/content_settings_utils.h
deleted file mode 100644
index 3f62cf68cf88586f8aecb211b530f3790f6206ae..0000000000000000000000000000000000000000
--- a/chrome/browser/content_settings/content_settings_utils.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
-#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
-
-#include <string>
-#include <utility>
-
-#include "components/content_settings/core/common/content_settings.h"
-#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 GURL;
-class HostContentSettingsMap;
-
-namespace content_settings {
-
-class ProviderInterface;
-class RuleIterator;
-
-typedef std::pair<ContentSettingsPattern, ContentSettingsPattern> PatternPair;
-
-std::string GetTypeName(ContentSettingsType type);
-
-bool GetTypeFromName(const std::string& name,
- ContentSettingsType* return_setting);
-
-std::string ContentSettingToString(ContentSetting setting);
-
-ContentSetting ContentSettingFromString(const std::string& name);
-
-// 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);
-
-// Caller takes the ownership of the returned |base::Value*|.
-base::Value* GetContentSettingValueAndPatterns(
- RuleIterator* rule_iterator,
- const GURL& primary_url,
- const GURL& secondary_url,
- ContentSettingsPattern* primary_pattern,
- ContentSettingsPattern* secondary_pattern);
-
-base::Value* GetContentSettingValueAndPatterns(
- const ProviderInterface* provider,
- const GURL& primary_url,
- const GURL& secondary_url,
- ContentSettingsType content_type,
- const std::string& resource_identifier,
- bool include_incognito,
- ContentSettingsPattern* primary_pattern,
- ContentSettingsPattern* secondary_pattern);
-
-base::Value* GetContentSettingValue(
- const ProviderInterface* provider,
- const GURL& primary_url,
- const GURL& secondary_url,
- ContentSettingsType content_type,
- const std::string& resource_identifier,
- bool include_incognito);
-
-ContentSetting GetContentSetting(
- const ProviderInterface* provider,
- const GURL& primary_url,
- const GURL& secondary_url,
- ContentSettingsType content_type,
- const std::string& resource_identifier,
- bool include_incognito);
-
-// Populates |rules| with content setting rules for content types that are
-// handled by the renderer.
-void GetRendererContentSettingRules(const HostContentSettingsMap* map,
- RendererContentSettingRules* rules);
-
-} // namespace content_settings
-
-#endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698