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

Unified Diff: chrome/browser/content_settings/content_settings_provider.h

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: More code review comments. Created 9 years, 3 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/content_settings/content_settings_provider.h
diff --git a/chrome/browser/content_settings/content_settings_provider.h b/chrome/browser/content_settings/content_settings_provider.h
index 466c9cddfe0d058df1c9c102d30793612e1667db..269cc701bbfde6a4bd19ff267363cf201e1c8ba8 100644
--- a/chrome/browser/content_settings/content_settings_provider.h
+++ b/chrome/browser/content_settings/content_settings_provider.h
@@ -50,6 +50,9 @@ class DefaultProviderInterface {
class ProviderInterface {
public:
struct Rule {
+ typedef bool (*SortFunction)(
+ const ProviderInterface::Rule&,
+ const ProviderInterface::Rule&);
Rule();
Rule(const ContentSettingsPattern& primary_pattern,
const ContentSettingsPattern& secondary_pattern,
@@ -58,6 +61,14 @@ class ProviderInterface {
ContentSettingsPattern primary_pattern;
ContentSettingsPattern secondary_pattern;
ContentSetting content_setting;
+
+ static bool LexicographicalSort(
+ const ProviderInterface::Rule& a,
+ const ProviderInterface::Rule& b);
+
+ static bool PatternPrecedenceSort(
+ const ProviderInterface::Rule& a,
+ const ProviderInterface::Rule& b);
};
typedef std::vector<Rule> Rules;

Powered by Google App Engine
This is Rietveld 408576698