| 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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 bool TestNetworkDelegate::OnCanAccessFile(const URLRequest& request, | 597 bool TestNetworkDelegate::OnCanAccessFile(const URLRequest& request, |
| 598 const base::FilePath& path) const { | 598 const base::FilePath& path) const { |
| 599 return can_access_files_; | 599 return can_access_files_; |
| 600 } | 600 } |
| 601 | 601 |
| 602 bool TestNetworkDelegate::OnCanThrottleRequest( | 602 bool TestNetworkDelegate::OnCanThrottleRequest( |
| 603 const URLRequest& request) const { | 603 const URLRequest& request) const { |
| 604 return can_throttle_requests_; | 604 return can_throttle_requests_; |
| 605 } | 605 } |
| 606 | 606 |
| 607 int TestNetworkDelegate::OnBeforeSocketStreamConnect( | |
| 608 SocketStream* socket, | |
| 609 const CompletionCallback& callback) { | |
| 610 return OK; | |
| 611 } | |
| 612 | |
| 613 bool TestNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( | 607 bool TestNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
| 614 const URLRequest& request, | 608 const URLRequest& request, |
| 615 const GURL& target_url, | 609 const GURL& target_url, |
| 616 const GURL& referrer_url) const { | 610 const GURL& referrer_url) const { |
| 617 return cancel_request_with_policy_violating_referrer_; | 611 return cancel_request_with_policy_violating_referrer_; |
| 618 } | 612 } |
| 619 | 613 |
| 620 // static | 614 // static |
| 621 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1"); | 615 std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1"); |
| 622 | 616 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 646 URLRequestJob* job = main_intercept_job_; | 640 URLRequestJob* job = main_intercept_job_; |
| 647 main_intercept_job_ = NULL; | 641 main_intercept_job_ = NULL; |
| 648 return job; | 642 return job; |
| 649 } | 643 } |
| 650 | 644 |
| 651 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { | 645 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { |
| 652 main_intercept_job_ = job; | 646 main_intercept_job_ = job; |
| 653 } | 647 } |
| 654 | 648 |
| 655 } // namespace net | 649 } // namespace net |
| OLD | NEW |