Index: chrome/browser/renderer_host/resource_message_filter.cc |
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc |
index 6b83d5cffa622f04dc0235612d2561be2728f01f..c927c6a9b21e9d27426c001cf7421e2fc2a93b3a 100644 |
--- a/chrome/browser/renderer_host/resource_message_filter.cc |
+++ b/chrome/browser/renderer_host/resource_message_filter.cc |
@@ -685,7 +685,7 @@ void ResourceMessageFilter::OnSetCookie(const IPC::Message& message, |
void ResourceMessageFilter::OnGetCookies(const GURL& url, |
const GURL& first_party_for_cookies, |
IPC::Message* reply_msg) { |
- URLRequestContext* context = GetRequestContextForURL(url); |
+ ChromeURLRequestContext* context = GetRequestContextForURL(url); |
GetCookiesCompletion* callback = |
new GetCookiesCompletion(id(), reply_msg->routing_id(), url, reply_msg, |
@@ -1751,7 +1751,7 @@ GetCookiesCompletion::GetCookiesCompletion(int render_process_id, |
const GURL& url, |
IPC::Message* reply_msg, |
ResourceMessageFilter* filter, |
- URLRequestContext* context, |
+ ChromeURLRequestContext* context, |
bool raw_cookies) |
: url_(url), |
reply_msg_(reply_msg), |
@@ -1773,6 +1773,17 @@ void GetCookiesCompletion::RunWithParams(const Tuple1<int>& params) { |
cookies = cookie_store()->GetCookies(url_); |
ViewHostMsg_GetCookies::WriteReplyParams(reply_msg_, cookies); |
filter_->Send(reply_msg_); |
+ if (!context_->IsExternal()) { |
+ net::CookieMonster* cookie_monster = |
+ context_->cookie_store()->GetCookieMonster(); |
+ CallRenderViewHostContentSettingsDelegate( |
+ render_process_id_, render_view_id_, |
+ &RenderViewHostDelegate::ContentSettings::OnCookiesRead, |
+ url_, |
+ cookie_monster->GetAllCookiesForURLWithOptions(url_, |
+ net::CookieOptions()), |
+ result != net::OK); |
+ } |
delete this; |
} else { |
// Ignore the policy result. We only waited on the policy result so that |