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

Unified Diff: chrome/browser/extensions/extension_content_settings_helpers.h

Issue 7229012: Use extension match pattern syntax in content settings extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initialize port Created 9 years, 6 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/extensions/extension_content_settings_helpers.h
diff --git a/chrome/browser/extensions/extension_content_settings_helpers.h b/chrome/browser/extensions/extension_content_settings_helpers.h
index c7c6f257ac4a00ce9633e86b8ce4b75bd84c4a86..b3e4ce70b938839f41f7f8778ece89cc1814d7e9 100644
--- a/chrome/browser/extensions/extension_content_settings_helpers.h
+++ b/chrome/browser/extensions/extension_content_settings_helpers.h
@@ -8,10 +8,19 @@
#include <string>
+#include "chrome/browser/content_settings/content_settings_pattern.h"
#include "chrome/common/content_settings.h"
namespace extension_content_settings_helpers {
+// Parses an extension match pattern and returns a corresponding
+// content settings pattern object.
+// If |pattern_str| is invalid or can't be converted to a content settings
+// pattern, |error| is set to the parsing error and an invalid pattern
+// is returned.
+ContentSettingsPattern ParseExtensionPattern(const std::string& pattern_str,
+ std::string* error);
+
// Converts a content settings type string to the corresponding
// ContentSettingsType. Returns CONTENT_SETTINGS_TYPE_DEFAULT if the string
// didn't specify a valid content settings type.

Powered by Google App Engine
This is Rietveld 408576698