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

Unified Diff: chrome/browser/automation/url_request_automation_job.cc

Issue 556095: Changes to support new cookie policy.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months 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
« no previous file with comments | « no previous file | chrome/browser/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/url_request_automation_job.cc
===================================================================
--- chrome/browser/automation/url_request_automation_job.cc (revision 37613)
+++ chrome/browser/automation/url_request_automation_job.cc (working copy)
@@ -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 @@
}
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 @@
}
}
- 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, ";");
« no previous file with comments | « no previous file | chrome/browser/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698