#ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_UTILS_H_
#include <string>
#include <utility>
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_pattern.h"
#include "chrome/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);
ContentSetting ValueToContentSetting(const base::Value* 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);
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);
void GetRendererContentSettingRules(const HostContentSettingsMap* map,
RendererContentSettingRules* rules);
}
#endif