| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 } | 537 } |
| 538 | 538 |
| 539 // static | 539 // static |
| 540 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { | 540 const std::string& ScopedCustomUrlRequestTestHttpHost::value() { |
| 541 return value_; | 541 return value_; |
| 542 } | 542 } |
| 543 | 543 |
| 544 TestJobInterceptor::TestJobInterceptor() : main_intercept_job_(NULL) { | 544 TestJobInterceptor::TestJobInterceptor() : main_intercept_job_(NULL) { |
| 545 } | 545 } |
| 546 | 546 |
| 547 URLRequestJob* TestJobInterceptor::MaybeIntercept( | 547 URLRequestJob* TestJobInterceptor::MaybeCreateJob( |
| 548 URLRequest* request, | 548 URLRequest* request, |
| 549 NetworkDelegate* network_delegate) const { | 549 NetworkDelegate* network_delegate) const { |
| 550 URLRequestJob* job = main_intercept_job_; | 550 URLRequestJob* job = main_intercept_job_; |
| 551 main_intercept_job_ = NULL; | 551 main_intercept_job_ = NULL; |
| 552 return job; | 552 return job; |
| 553 } | 553 } |
| 554 | 554 |
| 555 URLRequestJob* TestJobInterceptor::MaybeInterceptRedirect( | |
| 556 const GURL& location, | |
| 557 URLRequest* request, | |
| 558 NetworkDelegate* network_delegate) const { | |
| 559 return NULL; | |
| 560 } | |
| 561 | |
| 562 URLRequestJob* TestJobInterceptor::MaybeInterceptResponse( | |
| 563 URLRequest* request, | |
| 564 NetworkDelegate* network_delegate) const { | |
| 565 return NULL; | |
| 566 } | |
| 567 | |
| 568 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { | 555 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { |
| 569 main_intercept_job_ = job; | 556 main_intercept_job_ = job; |
| 570 } | 557 } |
| 571 | 558 |
| 572 } // namespace net | 559 } // namespace net |
| OLD | NEW |