diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 09:18:29 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-08 09:18:29 +0000 |
commit | 0314ae017cc069f72240401b52f6e37403c581ca (patch) | |
tree | 55f61e3ca4f6670648038cae338f82cddc2625bb /chrome/common | |
parent | 3184770afa9cbcf49680bab5046c57a7ca035388 (diff) | |
download | chromium_src-0314ae017cc069f72240401b52f6e37403c581ca.zip chromium_src-0314ae017cc069f72240401b52f6e37403c581ca.tar.gz chromium_src-0314ae017cc069f72240401b52f6e37403c581ca.tar.bz2 |
Implement patterns for content setting exceptions.
BUG=37394
TEST=unit_tests + manual
Review URL: http://codereview.chromium.org/1567010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/pref_names.cc | 15 | ||||
-rw-r--r-- | chrome/common/pref_names.h | 4 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 8 |
3 files changed, 20 insertions, 7 deletions
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 79afae1..2833173 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -324,10 +324,21 @@ const wchar_t kDesktopNotificationDeniedOrigins[] = // 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. +// OBSOLETE. 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"; +// Version of the pattern format used to define content settings. +const wchar_t kContentSettingsVersion[] = + L"profile.content_settings.pref_version"; + +// Patterns for mapping hostnames to content related settings. Default settings +// will be applied to hosts that don't match any of the patterns. Replaces +// kPerHostContentSettings. The pattern format used is defined by +// kContentSettingsVersion. +const wchar_t kContentSettingsPatterns[] = + L"profile.content_settings.patterns"; + // 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"; diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index cbbb603..5436aaa 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h @@ -126,7 +126,9 @@ extern const wchar_t kNTPPromoImageRemaining[]; extern const wchar_t kDesktopNotificationAllowedOrigins[]; extern const wchar_t kDesktopNotificationDeniedOrigins[]; extern const wchar_t kDefaultContentSettings[]; -extern const wchar_t kPerHostContentSettings[]; +extern const wchar_t kPerHostContentSettings[]; // OBSOLETE +extern const wchar_t kContentSettingsVersion[]; +extern const wchar_t kContentSettingsPatterns[]; extern const wchar_t kBlockThirdPartyCookies[]; extern const wchar_t kClearSiteDataOnExit[]; extern const wchar_t kPerHostZoomLevels[]; diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index eb84df0..3f7b047 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -378,10 +378,10 @@ IPC_BEGIN_MESSAGES(View) std::string /* host */, ContentSettings /* content_settings */) - // Set the content settings for a particular hostname, so all render views - // displaying this host can update their content settings to match. - IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentHost, - std::string /* host */, + // Set the content settings for a particular url, so all render views + // displaying this host url update their content settings to match. + IPC_MESSAGE_CONTROL2(ViewMsg_SetContentSettingsForCurrentURL, + GURL /* url */, ContentSettings /* content_settings */) // Change encoding of page in the renderer. |