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 edafe6cd2f9e2d6d0ff46d24c8857d011e9d6130..5897649a7115645f4050ecccfe1809b3cde861d9 100644 |
--- a/chrome/browser/tab_contents/tab_specific_content_settings.cc |
+++ b/chrome/browser/tab_contents/tab_specific_content_settings.cc |
@@ -93,6 +93,30 @@ void TabSpecificContentSettings::OnContentAccessed(ContentSettingsType type) { |
} |
} |
+void TabSpecificContentSettings::OnCookiesRead( |
+ const GURL& url, |
+ const net::CookieMonster::CookieList& cookie_list, |
+ bool blocked_by_policy) { |
+ LocalSharedObjectsContainer& container = blocked_by_policy ? |
+ blocked_local_shared_objects_ : allowed_local_shared_objects_; |
+ typedef net::CookieMonster::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::OnCookieAccessed( |
const GURL& url, const std::string& cookie_line, bool blocked_by_policy) { |
net::CookieOptions options; |