summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_specific_content_settings.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-01-07 14:18:56 +0000
committerBen Murdoch <benm@google.com>2011-01-11 10:23:13 +0000
commit201ade2fbba22bfb27ae029f4d23fca6ded109a0 (patch)
treeb793f4ed916f73cf18357ea467ff3deb5ffb5b52 /chrome/browser/tab_contents/tab_specific_content_settings.cc
parentd8c4c37a7d0961944bfdfaa117d5c68c8e129c97 (diff)
downloadexternal_chromium-201ade2fbba22bfb27ae029f4d23fca6ded109a0.zip
external_chromium-201ade2fbba22bfb27ae029f4d23fca6ded109a0.tar.gz
external_chromium-201ade2fbba22bfb27ae029f4d23fca6ded109a0.tar.bz2
Merge chromium at 9.0.597.55: Initial merge by git.
Change-Id: Id686a88437441ec7e17abb3328a404c7b6c3c6ad
Diffstat (limited to 'chrome/browser/tab_contents/tab_specific_content_settings.cc')
-rw-r--r--chrome/browser/tab_contents/tab_specific_content_settings.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/tab_specific_content_settings.cc b/chrome/browser/tab_contents/tab_specific_content_settings.cc
index edafe6c..22550ea 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings.cc
+++ b/chrome/browser/tab_contents/tab_specific_content_settings.cc
@@ -40,6 +40,16 @@ bool TabSpecificContentSettings::IsContentBlocked(
return false;
}
+bool TabSpecificContentSettings::IsBlockageIndicated(
+ ContentSettingsType content_type) const {
+ return content_blockage_indicated_to_user_[content_type];
+}
+
+void TabSpecificContentSettings::SetBlockageHasBeenIndicated(
+ ContentSettingsType content_type) {
+ content_blockage_indicated_to_user_[content_type] = true;
+}
+
bool TabSpecificContentSettings::IsContentAccessed(
ContentSettingsType content_type) const {
// This method currently only returns meaningful values for cookies.
@@ -94,9 +104,10 @@ void TabSpecificContentSettings::OnContentAccessed(ContentSettingsType type) {
}
void TabSpecificContentSettings::OnCookieAccessed(
- const GURL& url, const std::string& cookie_line, bool blocked_by_policy) {
- net::CookieOptions options;
- options.set_include_httponly();
+ const GURL& url,
+ const std::string& cookie_line,
+ const net::CookieOptions& options,
+ bool blocked_by_policy) {
if (blocked_by_policy) {
blocked_local_shared_objects_.cookies()->SetCookieWithOptions(
url, cookie_line, options);
@@ -196,6 +207,7 @@ void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() {
blocked_resources_[i].reset();
content_blocked_[i] = false;
content_accessed_[i] = false;
+ content_blockage_indicated_to_user_[i] = false;
}
load_plugins_link_enabled_ = true;
if (delegate_)
@@ -207,12 +219,14 @@ void TabSpecificContentSettings::ClearCookieSpecificContentSettings() {
allowed_local_shared_objects_.Reset();
content_blocked_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
content_accessed_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
+ content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
if (delegate_)
delegate_->OnContentSettingsAccessed(false);
}
void TabSpecificContentSettings::SetPopupsBlocked(bool blocked) {
content_blocked_[CONTENT_SETTINGS_TYPE_POPUPS] = blocked;
+ content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_POPUPS] = false;
if (delegate_)
delegate_->OnContentSettingsAccessed(blocked);
}