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

Side by Side Diff: net/url_request/url_request_test_util.cc

Issue 10694093: Remove the force_session cookie option, as it's not used anymore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_test_util.h" 5 #include "net/url_request/url_request_test_util.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 return allow; 468 return allow;
469 } 469 }
470 470
471 bool TestNetworkDelegate::OnCanSetCookie(const net::URLRequest& request, 471 bool TestNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
472 const std::string& cookie_line, 472 const std::string& cookie_line,
473 net::CookieOptions* options) { 473 net::CookieOptions* options) {
474 bool allow = true; 474 bool allow = true;
475 if (cookie_options_bit_mask_ & NO_SET_COOKIE) 475 if (cookie_options_bit_mask_ & NO_SET_COOKIE)
476 allow = false; 476 allow = false;
477 477
478 if (cookie_options_bit_mask_ & FORCE_SESSION)
479 options->set_force_session();
480
481 if (!allow) { 478 if (!allow) {
482 blocked_set_cookie_count_++; 479 blocked_set_cookie_count_++;
483 } else { 480 } else {
484 set_cookie_count_++; 481 set_cookie_count_++;
485 } 482 }
486 483
487 return allow; 484 return allow;
488 } 485 }
489 486
490 bool TestNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, 487 bool TestNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
(...skipping 24 matching lines...) Expand all
515 512
516 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { 513 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() {
517 DCHECK_EQ(value_, new_value_); 514 DCHECK_EQ(value_, new_value_);
518 value_ = old_value_; 515 value_ = old_value_;
519 } 516 }
520 517
521 // static 518 // static
522 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { 519 const std::string& ScopedCustomUrlRequestTestHttpHost::value() {
523 return value_; 520 return value_;
524 } 521 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698