summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 08:02:34 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 08:02:34 +0000
commita4aae64528e0a4b62608b3f31c4ff95c0ad487ca (patch)
treeb4450ce5d4b0210f4788ac1c9029e66bead92f0f
parentbd3bd44953d12d7480f39af550c8259dfab7128a (diff)
downloadchromium_src-a4aae64528e0a4b62608b3f31c4ff95c0ad487ca.zip
chromium_src-a4aae64528e0a4b62608b3f31c4ff95c0ad487ca.tar.gz
chromium_src-a4aae64528e0a4b62608b3f31c4ff95c0ad487ca.tar.bz2
Correctly report HttpOnly cookies and correctly reset the Cookie Monster
BUG=77199 TEST=as described in the bug Review URL: http://codereview.chromium.org/6736030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79529 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/tab_specific_content_settings.cc6
-rw-r--r--net/url_request/url_request_http_job.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/tab_specific_content_settings.cc b/chrome/browser/tab_contents/tab_specific_content_settings.cc
index ce6c330..7dcc0ab 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings.cc
+++ b/chrome/browser/tab_contents/tab_specific_content_settings.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -306,6 +306,10 @@ TabSpecificContentSettings::LocalSharedObjectsContainer::
void TabSpecificContentSettings::LocalSharedObjectsContainer::Reset() {
cookies_ = new net::CookieMonster(NULL, NULL);
+ cookies_->SetCookieableSchemes(
+ net::CookieMonster::kDefaultCookieableSchemes,
+ net::CookieMonster::kDefaultCookieableSchemesCount);
+ cookies_->SetKeepExpiredCookies();
appcaches_->Reset();
databases_->Reset();
indexed_dbs_->Reset();
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index b554d27..f773634 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -614,10 +614,12 @@ void URLRequestHttpJob::OnCanSetCookieCompleted(int policy) {
if (request_ && request_->delegate()) {
if (request_->context()->cookie_store()) {
if (policy == ERR_ACCESS_DENIED) {
+ CookieOptions options;
+ options.set_include_httponly();
request_->delegate()->OnSetCookie(
request_,
response_cookies_[response_cookies_save_index_],
- CookieOptions(),
+ options,
true);
} else if (policy == OK || policy == OK_FOR_SESSION_ONLY) {
// OK to save the current response cookie now.