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

Unified Diff: components/content_settings/core/test/content_settings_test_utils.h

Issue 1442083002: Stop inheriting push notification permissions from regular to incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review nits Created 5 years 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/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

Powered by Google App Engine
This is Rietveld 408576698