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

Unified Diff: chrome/browser/tab_contents/tab_specific_content_settings.cc

Issue 5318002: Also register read cookies in the content settings delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 10 years 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/tab_contents/tab_specific_content_settings.cc
diff --git a/chrome/browser/tab_contents/tab_specific_content_settings.cc b/chrome/browser/tab_contents/tab_specific_content_settings.cc
index 22550ea9eedce01b36b001c728120f80ab157b9a..e5e6f4230d95b89ddcf5e876624842e5e3b699e4 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings.cc
+++ b/chrome/browser/tab_contents/tab_specific_content_settings.cc
@@ -103,7 +103,31 @@ void TabSpecificContentSettings::OnContentAccessed(ContentSettingsType type) {
}
}
-void TabSpecificContentSettings::OnCookieAccessed(
+void TabSpecificContentSettings::OnCookiesRead(
+ const GURL& url,
+ const net::CookieList& cookie_list,
+ bool blocked_by_policy) {
+ LocalSharedObjectsContainer& container = blocked_by_policy ?
+ blocked_local_shared_objects_ : allowed_local_shared_objects_;
+ typedef net::CookieList::const_iterator cookie_iterator;
+ for (cookie_iterator cookie = cookie_list.begin();
+ cookie != cookie_list.end(); ++cookie) {
+ container.cookies()->SetCookieWithDetails(url,
+ cookie->Name(),
+ cookie->Value(),
+ cookie->Domain(),
+ cookie->Path(),
+ cookie->ExpiryDate(),
+ cookie->IsSecure(),
+ cookie->IsHttpOnly());
+ }
+ if (blocked_by_policy)
+ OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, std::string());
+ else
+ OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES);
+}
+
+void TabSpecificContentSettings::OnCookieChanged(
const GURL& url,
const std::string& cookie_line,
const net::CookieOptions& options,

Powered by Google App Engine
This is Rietveld 408576698