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

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

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.cc
diff --git a/components/content_settings/core/test/content_settings_test_utils.cc b/components/content_settings/core/test/content_settings_test_utils.cc
index 320a19eaa6dd75ed333cb66ff7ec45ed1286006a..87207195f02851e5e1be9073e4bb820b42c65eb3 100644
--- a/components/content_settings/core/test/content_settings_test_utils.cc
+++ b/components/content_settings/core/test/content_settings_test_utils.cc
@@ -4,33 +4,48 @@
#include "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/host_content_settings_map.h"
#include "components/content_settings/core/common/content_settings_types.h"
namespace content_settings {
-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) {
- return GetContentSettingValueAndPatterns(provider, primary_url, secondary_url,
- content_type, resource_identifier,
- include_incognito, NULL, NULL);
+// static
+base::Value* TestUtils::GetContentSettingValue(
+ const ProviderInterface* provider,
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType content_type,
+ const std::string& resource_identifier,
+ bool include_incognito) {
+ return HostContentSettingsMap::GetContentSettingValueAndPatterns(
+ provider, primary_url, secondary_url, content_type, resource_identifier,
+ include_incognito, NULL, NULL).release();
}
-ContentSetting GetContentSetting(const ProviderInterface* provider,
- const GURL& primary_url,
- const GURL& secondary_url,
- ContentSettingsType content_type,
- const std::string& resource_identifier,
- bool include_incognito) {
+// static
+ContentSetting TestUtils::GetContentSetting(
+ const ProviderInterface* provider,
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsType content_type,
+ const std::string& resource_identifier,
+ bool include_incognito) {
scoped_ptr<base::Value> value(
GetContentSettingValue(provider, primary_url, secondary_url, content_type,
resource_identifier, include_incognito));
return ValueToContentSetting(value.get());
}
+// static
+scoped_ptr<base::Value> TestUtils::GetContentSettingValueAndPatterns(
+ content_settings::RuleIterator* rule_iterator,
+ const GURL& primary_url,
+ const GURL& secondary_url,
+ ContentSettingsPattern* primary_pattern,
+ ContentSettingsPattern* secondary_pattern) {
+ return HostContentSettingsMap::GetContentSettingValueAndPatterns(
+ rule_iterator, primary_url, secondary_url, primary_pattern,
+ secondary_pattern);
+}
+
} // namespace content_settings

Powered by Google App Engine
This is Rietveld 408576698