summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 10:29:55 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-30 10:29:55 +0000
commite56dc3873b9d6da6ac9165cf8b15d7955567109f (patch)
treed690f4e9ca2a95328672124b6b056bfd73f9d441 /chrome/common
parent8fa3ff0ef4e1f9cee8fea3d71e454f5a569e5493 (diff)
downloadchromium_src-e56dc3873b9d6da6ac9165cf8b15d7955567109f.zip
chromium_src-e56dc3873b9d6da6ac9165cf8b15d7955567109f.tar.gz
chromium_src-e56dc3873b9d6da6ac9165cf8b15d7955567109f.tar.bz2
Merge 37631 - Hook up some of the content settings UI to the actual settings map object. This also rewrites the affected UI bits to make it easier to do this, get rid of unnecessary code, and be more consistent with the blocked content bubble code.
BUG=32719 TEST=Content settings windows now have radio buttons that work, and remember their settings. The Flash link works too. Review URL: http://codereview.chromium.org/558060 TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/548214 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@37635 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/content_settings.h6
-rw-r--r--chrome/common/content_settings_types.h3
-rw-r--r--chrome/common/pref_names.cc6
-rw-r--r--chrome/common/pref_names.h1
4 files changed, 9 insertions, 7 deletions
diff --git a/chrome/common/content_settings.h b/chrome/common/content_settings.h
index 59d58c8..3e798b3 100644
--- a/chrome/common/content_settings.h
+++ b/chrome/common/content_settings.h
@@ -10,8 +10,7 @@
// Different settings that can be assigned for a particular content type. We
// give the user the ability to set these on a global and per-host basis.
enum ContentSetting {
- CONTENT_SETTING_FIRST_SETTING = 0,
- CONTENT_SETTING_DEFAULT = CONTENT_SETTING_FIRST_SETTING,
+ CONTENT_SETTING_DEFAULT = 0,
CONTENT_SETTING_ALLOW,
CONTENT_SETTING_BLOCK,
CONTENT_SETTING_ASK,
@@ -21,8 +20,7 @@ enum ContentSetting {
// Aggregates the permissions for the different content types.
struct ContentSettings {
ContentSettings() {
- for (int i = CONTENT_SETTINGS_FIRST_TYPE; i < CONTENT_SETTINGS_NUM_TYPES;
- ++i)
+ for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i)
settings[i] = CONTENT_SETTING_DEFAULT;
}
diff --git a/chrome/common/content_settings_types.h b/chrome/common/content_settings_types.h
index 2026bac..3eb8595 100644
--- a/chrome/common/content_settings_types.h
+++ b/chrome/common/content_settings_types.h
@@ -11,8 +11,7 @@ enum ContentSettingsType {
// "DEFAULT" is only used as an argument to the Content Settings Window
// opener; there it means "whatever was last shown".
CONTENT_SETTINGS_TYPE_DEFAULT = -1,
- CONTENT_SETTINGS_FIRST_TYPE = 0,
- CONTENT_SETTINGS_TYPE_COOKIES = CONTENT_SETTINGS_FIRST_TYPE,
+ CONTENT_SETTINGS_TYPE_COOKIES = 0,
CONTENT_SETTINGS_TYPE_IMAGES,
CONTENT_SETTINGS_TYPE_JAVASCRIPT,
CONTENT_SETTINGS_TYPE_PLUGINS,
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 76aba64..d7f4499 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -304,13 +304,17 @@ const wchar_t kDesktopNotificationAllowedOrigins[] =
const wchar_t kDesktopNotificationDeniedOrigins[] =
L"profile.notification_denied_sites";
-// Bitmask of content settings applied to hosts per default.
+// Dictionary of content settings applied to all hosts by default.
const wchar_t kDefaultContentSettings[] = L"profile.default_content_settings";
// Dictionary that maps hostnames to content related settings. Default
// settings will be applied to hosts not in this pref.
const wchar_t kPerHostContentSettings[] = L"profile.per_host_content_settings";
+// Boolean that is true if we should unconditionally block third-party cookies,
+// regardless of other content settings.
+const wchar_t kBlockThirdPartyCookies[] = L"profile.block_third_party_cookies";
+
// *************** LOCAL STATE ***************
// These are attached to the machine/installation
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 4e8c437..22c1407 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -122,6 +122,7 @@ extern const wchar_t kDesktopNotificationAllowedOrigins[];
extern const wchar_t kDesktopNotificationDeniedOrigins[];
extern const wchar_t kDefaultContentSettings[];
extern const wchar_t kPerHostContentSettings[];
+extern const wchar_t kBlockThirdPartyCookies[];
// Local state
extern const wchar_t kMetricsClientID[];