diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 08:24:12 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 08:24:12 +0000 |
commit | cb370a06391bd8cd1d3c52e4722645962366dd42 (patch) | |
tree | 9ca36ba10363365401bd1a816962f4679fda8467 /chrome/browser/automation | |
parent | dbefae2c2db09a90c2b9ee4d3ea1a40e580e532e (diff) | |
download | chromium_src-cb370a06391bd8cd1d3c52e4722645962366dd42.zip chromium_src-cb370a06391bd8cd1d3c52e4722645962366dd42.tar.gz chromium_src-cb370a06391bd8cd1d3c52e4722645962366dd42.tar.bz2 |
Changes to support new cookie policy.
Changes:
1- net::CookiePolicy becomes an interface.
2- Old implementaiton of CookiePolicy copied to StaticCookiePolicy.
3- ChromeULRRequestContext implements CookiePolicy.
4- HostContentSettingsMap gets a global "BlockThirdPartyCookies" pref.
R=pkasting
Review URL: http://codereview.chromium.org/556095
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/url_request_automation_job.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc index a22d05a..70d1d52 100644 --- a/chrome/browser/automation/url_request_automation_job.cc +++ b/chrome/browser/automation/url_request_automation_job.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. @@ -13,6 +13,7 @@ #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "chrome/test/automation/automation_messages.h" #include "net/base/cookie_monster.h" +#include "net/base/cookie_policy.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/http/http_util.h" @@ -312,7 +313,7 @@ void URLRequestAutomationJob::OnRequestStarted(int tab, int id, } if (response_cookies.size()) { - if (ctx && ctx->cookie_store() && + if (ctx && ctx->cookie_store() && ctx->cookie_policy() && ctx->cookie_policy()->CanSetCookie( url_for_cookies, request_->first_party_for_cookies())) { net::CookieOptions options; @@ -324,7 +325,8 @@ void URLRequestAutomationJob::OnRequestStarted(int tab, int id, } } - if (ctx && ctx->cookie_store() && !response.persistent_cookies.empty() && + if (ctx && ctx->cookie_store() && ctx->cookie_policy() && + !response.persistent_cookies.empty() && ctx->cookie_policy()->CanSetCookie( url_for_cookies, request_->first_party_for_cookies())) { StringTokenizer cookie_parser(response.persistent_cookies, ";"); |