| OLD | NEW |
| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 const net::URLRequest& request) const { | 496 const net::URLRequest& request) const { |
| 497 return true; | 497 return true; |
| 498 } | 498 } |
| 499 | 499 |
| 500 int TestNetworkDelegate::OnBeforeSocketStreamConnect( | 500 int TestNetworkDelegate::OnBeforeSocketStreamConnect( |
| 501 net::SocketStream* socket, | 501 net::SocketStream* socket, |
| 502 const net::CompletionCallback& callback) { | 502 const net::CompletionCallback& callback) { |
| 503 return net::OK; | 503 return net::OK; |
| 504 } | 504 } |
| 505 | 505 |
| 506 void TestNetworkDelegate::OnCacheWaitStateChange(const net::URLRequest& request, |
| 507 CacheWaitState state) { |
| 508 } |
| 509 |
| 506 // static | 510 // static |
| 507 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1"); | 511 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1"); |
| 508 | 512 |
| 509 ScopedCustomUrlRequestTestHttpHost::ScopedCustomUrlRequestTestHttpHost( | 513 ScopedCustomUrlRequestTestHttpHost::ScopedCustomUrlRequestTestHttpHost( |
| 510 const std::string& new_value) | 514 const std::string& new_value) |
| 511 : old_value_(value_), | 515 : old_value_(value_), |
| 512 new_value_(new_value) { | 516 new_value_(new_value) { |
| 513 value_ = new_value_; | 517 value_ = new_value_; |
| 514 } | 518 } |
| 515 | 519 |
| 516 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { | 520 ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() { |
| 517 DCHECK_EQ(value_, new_value_); | 521 DCHECK_EQ(value_, new_value_); |
| 518 value_ = old_value_; | 522 value_ = old_value_; |
| 519 } | 523 } |
| 520 | 524 |
| 521 // static | 525 // static |
| 522 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { | 526 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { |
| 523 return value_; | 527 return value_; |
| 524 } | 528 } |
| OLD | NEW |