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