| Index: components/content_settings/core/test/content_settings_test_utils.h
|
| diff --git a/components/content_settings/core/test/content_settings_test_utils.h b/components/content_settings/core/test/content_settings_test_utils.h
|
| index 3e3fdb5f2c2ed439c95830850591c98540e7c604..50b7cd3a32d68e0fb7e1bac836272a4042790907 100644
|
| --- a/components/content_settings/core/test/content_settings_test_utils.h
|
| +++ b/components/content_settings/core/test/content_settings_test_utils.h
|
| @@ -5,28 +5,48 @@
|
| #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_TEST_CONTENT_SETTINGS_TEST_UTILS_H_
|
| #define COMPONENTS_CONTENT_SETTINGS_CORE_TEST_CONTENT_SETTINGS_TEST_UTILS_H_
|
|
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/values.h"
|
| #include "components/content_settings/core/browser/content_settings_utils.h"
|
|
|
| namespace content_settings {
|
|
|
| -// The following two functions return the content setting (represented as
|
| -// Value or directly the ContentSetting enum) from |provider| for the
|
| -// given |content_type| and |resource_identifier|. The returned content setting
|
| -// applies to the primary and secondary URL, and to the normal or incognito
|
| -// mode, depending on |include_incognito|.
|
| -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);
|
| +class TestUtils {
|
| + public:
|
| + // The following two functions return the content setting (represented as
|
| + // Value or directly the ContentSetting enum) from |provider| for the
|
| + // given |content_type| and |resource_identifier|. The returned content
|
| + // setting applies to the primary and secondary URL, and to the normal or
|
| + // incognito mode, depending on |include_incognito|.
|
| + static 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);
|
| +
|
| + static ContentSetting GetContentSetting(
|
| + const ProviderInterface* provider,
|
| + const GURL& primary_url,
|
| + const GURL& secondary_url,
|
| + ContentSettingsType content_type,
|
| + const std::string& resource_identifier,
|
| + bool include_incognito);
|
| +
|
| + // This wrapper exists only to make
|
| + // HostContentSettingsMap::GetContentSettingValueAndPatterns public for use in
|
| + // tests.
|
| + static scoped_ptr<base::Value> GetContentSettingValueAndPatterns(
|
| + content_settings::RuleIterator* rule_iterator,
|
| + const GURL& primary_url,
|
| + const GURL& secondary_url,
|
| + ContentSettingsPattern* primary_pattern,
|
| + ContentSettingsPattern* secondary_pattern);
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(TestUtils);
|
| +};
|
|
|
| } // namespace content_settings
|
|
|
|
|