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

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

Issue 10541046: Adds NetworkDelegate::NotifyBeforeSocketStreamConnect() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comments Created 8 years, 6 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
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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 bool TestNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, 491 bool TestNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
492 const FilePath& path) const { 492 const FilePath& path) const {
493 return true; 493 return true;
494 } 494 }
495 495
496 bool TestNetworkDelegate::OnCanThrottleRequest( 496 bool TestNetworkDelegate::OnCanThrottleRequest(
497 const net::URLRequest& request) const { 497 const net::URLRequest& request) const {
498 return true; 498 return true;
499 } 499 }
500 500
501 int TestNetworkDelegate::OnBeforeSocketStreamConnect(
502 net::SocketStream* socket,
503 const net::CompletionCallback& callback) {
504 return net::OK;
505 }
506
501 // static 507 // static
502 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1"); 508 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1");
503 509
504 ScopedCustomUrlRequestTestHttpHost::ScopedCustomUrlRequestTestHttpHost( 510 ScopedCustomUrlRequestTestHttpHost::ScopedCustomUrlRequestTestHttpHost(
505 const std::string& new_value) 511 const std::string& new_value)
506 : old_value_(value_), 512 : old_value_(value_),
507 new_value_(new_value) { 513 new_value_(new_value) {
508 value_ = new_value_; 514 value_ = new_value_;
509 } 515 }
510 516
511 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { 517 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() {
512 DCHECK_EQ(value_, new_value_); 518 DCHECK_EQ(value_, new_value_);
513 value_ = old_value_; 519 value_ = old_value_;
514 } 520 }
515 521
516 // static 522 // static
517 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { 523 const std::string& ScopedCustomUrlRequestTestHttpHost::value() {
518 return value_; 524 return value_;
519 } 525 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | webkit/tools/test_shell/simple_resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698