summaryrefslogtreecommitdiffstats
path: root/chrome/common/content_settings.h
diff options
context:
space:
mode:
authormarja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-27 13:43:42 +0000
committermarja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-27 13:43:42 +0000
commitc144060968bce7873e4079bd2293272fe03b520f (patch)
tree6d1f7cc551e53d2626ff522ec46adb18da6c991c /chrome/common/content_settings.h
parent78d4939cf2732a79ff823a0b00938e6aef77cf97 (diff)
downloadchromium_src-c144060968bce7873e4079bd2293272fe03b520f.zip
chromium_src-c144060968bce7873e4079bd2293272fe03b520f.tar.gz
chromium_src-c144060968bce7873e4079bd2293272fe03b520f.tar.bz2
Delegating the "are images allowed" decision to renderer.
This enables making the decision based on both image url and the page url. E.g., blocking third-party images. BUG=81179 TEST=RenderViewTest.ImagesBlockedByDefault, RenderViewTest.ImagesAllowedByDefault Review URL: http://codereview.chromium.org/7831075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/content_settings.h')
-rw-r--r--chrome/common/content_settings.h33
1 files changed, 23 insertions, 10 deletions
diff --git a/chrome/common/content_settings.h b/chrome/common/content_settings.h
index 4731263..2c7e5c2 100644
--- a/chrome/common/content_settings.h
+++ b/chrome/common/content_settings.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,10 @@
#define CHROME_COMMON_CONTENT_SETTINGS_H_
#pragma once
+#include <string>
+#include <vector>
+
+#include "chrome/common/content_settings_pattern.h"
#include "chrome/common/content_settings_types.h"
// Different settings that can be assigned for a particular content type. We
@@ -25,17 +29,26 @@ ContentSetting IntToContentSetting(int content_setting);
// Aggregates the permissions for the different content types.
struct ContentSettings {
- ContentSettings() {
- for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i)
- settings[i] = CONTENT_SETTING_DEFAULT;
- }
-
- explicit ContentSettings(ContentSetting default_setting) {
- for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i)
- settings[i] = default_setting;
- }
+ ContentSettings();
+ explicit ContentSettings(ContentSetting default_setting);
ContentSetting settings[CONTENT_SETTINGS_NUM_TYPES];
};
+struct ContentSettingPatternSource {
+ ContentSettingPatternSource(const ContentSettingsPattern& primary_pattern,
+ const ContentSettingsPattern& secondary_patttern,
+ ContentSetting setting,
+ const std::string& source,
+ bool incognito);
+ ContentSettingPatternSource();
+ ContentSettingsPattern primary_pattern;
+ ContentSettingsPattern secondary_pattern;
+ ContentSetting setting;
+ std::string source;
+ bool incognito;
+};
+
+typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType;
+
#endif // CHROME_COMMON_CONTENT_SETTINGS_H_