diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 20:05:44 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 20:05:44 +0000 |
commit | b8430726aee195e69451e031b47e91a9514b0965 (patch) | |
tree | cdb97023d33b544f8d598284d84a94495da649bd /net/url_request | |
parent | 63271da3b3740aadd3bd5d186bf7bd2b33ee6347 (diff) | |
download | chromium_src-b8430726aee195e69451e031b47e91a9514b0965.zip chromium_src-b8430726aee195e69451e031b47e91a9514b0965.tar.gz chromium_src-b8430726aee195e69451e031b47e91a9514b0965.tar.bz2 |
Don't set any cookies as a result of the Google URL Tracker update check. This way, if users clear their cookies and restart, they won't have to wonder why a Google cookie has suddenly mysteriously appeared.
BUG=1204
Review URL: http://codereview.chromium.org/2937
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_http_job.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index 303d245..8316e73 100644 --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc @@ -8,6 +8,7 @@ #include "base/message_loop.h" #include "base/string_util.h" #include "net/base/cookie_monster.h" +#include "net/base/load_flags.h" #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/http/http_response_info.h" @@ -402,14 +403,15 @@ void URLRequestHttpJob::NotifyHeadersComplete() { response_info_ = transaction_->GetResponseInfo(); // Get the Set-Cookie values, and send them to our cookie database. - - FetchResponseCookies(); - - URLRequestContext* ctx = request_->context(); - if (ctx && ctx->cookie_store() && - ctx->cookie_policy()->CanSetCookie(request_->url(), - request_->policy_url())) - ctx->cookie_store()->SetCookies(request_->url(), response_cookies_); + if (!(request_info_.load_flags & net::LOAD_DO_NOT_SAVE_COOKIES)) { + URLRequestContext* ctx = request_->context(); + if (ctx && ctx->cookie_store() && + ctx->cookie_policy()->CanSetCookie(request_->url(), + request_->policy_url())) { + FetchResponseCookies(); + ctx->cookie_store()->SetCookies(request_->url(), response_cookies_); + } + } URLRequestJob::NotifyHeadersComplete(); } |