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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 5318002: Also register read cookies in the content settings delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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: 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 =

Powered by Google App Engine
This is Rietveld 408576698