Index: net/url_request/url_request_http_job.cc |
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc |
index f00f490d38235a926611668c33f90c24c1cf18d4..7f56b82bb08019b206b162a6262d22a7fe41dd5b 100644 |
--- a/net/url_request/url_request_http_job.cc |
+++ b/net/url_request/url_request_http_job.cc |
@@ -440,10 +440,19 @@ void URLRequestHttpJob::StopCaching() { |
void URLRequestHttpJob::OnCanGetCookiesCompleted(int policy) { |
// If the request was destroyed, then there is no more work to do. |
if (request_ && request_->delegate()) { |
- if (policy == net::ERR_ACCESS_DENIED) { |
- request_->delegate()->OnGetCookies(request_, true); |
+ if (policy == net::ERR_ACCESS_DENIED && |
+ request_->context()->cookie_store()) { |
+ request_->delegate()->OnGetCookies( |
+ request_, |
+ request_->context()->cookie_store()->GetCookieMonster()-> |
darin (slow to review)
2010/11/24 18:10:47
this is breaking the abstraction of the CookieStor
jochen (gone - plz use gerrit)
2010/11/24 18:45:38
Since the cookies aren't collected for chrome fram
|
+ GetAllCookiesForURL(request_->url()), |
+ true); |
} else if (policy == net::OK && request_->context()->cookie_store()) { |
- request_->delegate()->OnGetCookies(request_, false); |
+ request_->delegate()->OnGetCookies( |
+ request_, |
+ request_->context()->cookie_store()->GetCookieMonster()-> |
+ GetAllCookiesForURL(request_->url()), |
+ false); |
net::CookieOptions options; |
options.set_include_httponly(); |
std::string cookies = |