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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 | 652 |
653 bool TestNetworkDelegate::OnCanAccessFile(const URLRequest& request, | 653 bool TestNetworkDelegate::OnCanAccessFile(const URLRequest& request, |
654 const base::FilePath& path) const { | 654 const base::FilePath& path) const { |
655 return can_access_files_; | 655 return can_access_files_; |
656 } | 656 } |
657 | 657 |
658 bool TestNetworkDelegate::OnAreExperimentalCookieFeaturesEnabled() const { | 658 bool TestNetworkDelegate::OnAreExperimentalCookieFeaturesEnabled() const { |
659 return experimental_cookie_features_enabled_; | 659 return experimental_cookie_features_enabled_; |
660 } | 660 } |
661 | 661 |
662 bool TestNetworkDelegate::OnAreStrictSecureCookiesEnabled() const { | |
663 return experimental_cookie_features_enabled_; | |
664 } | |
665 | |
666 bool TestNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( | 662 bool TestNetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
667 const URLRequest& request, | 663 const URLRequest& request, |
668 const GURL& target_url, | 664 const GURL& target_url, |
669 const GURL& referrer_url) const { | 665 const GURL& referrer_url) const { |
670 return cancel_request_with_policy_violating_referrer_; | 666 return cancel_request_with_policy_violating_referrer_; |
671 } | 667 } |
672 | 668 |
673 TestJobInterceptor::TestJobInterceptor() {} | 669 TestJobInterceptor::TestJobInterceptor() {} |
674 | 670 |
675 TestJobInterceptor::~TestJobInterceptor() {} | 671 TestJobInterceptor::~TestJobInterceptor() {} |
676 | 672 |
677 URLRequestJob* TestJobInterceptor::MaybeCreateJob( | 673 URLRequestJob* TestJobInterceptor::MaybeCreateJob( |
678 URLRequest* request, | 674 URLRequest* request, |
679 NetworkDelegate* network_delegate) const { | 675 NetworkDelegate* network_delegate) const { |
680 return main_intercept_job_.release(); | 676 return main_intercept_job_.release(); |
681 } | 677 } |
682 | 678 |
683 void TestJobInterceptor::set_main_intercept_job( | 679 void TestJobInterceptor::set_main_intercept_job( |
684 std::unique_ptr<URLRequestJob> job) { | 680 std::unique_ptr<URLRequestJob> job) { |
685 main_intercept_job_ = std::move(job); | 681 main_intercept_job_ = std::move(job); |
686 } | 682 } |
687 | 683 |
688 } // namespace net | 684 } // namespace net |
OLD | NEW |