Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h" | 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_protocol. h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 : net::NetworkDelegate(), test_data_reduction_proxy_params_(test_params) { | 61 : net::NetworkDelegate(), test_data_reduction_proxy_params_(test_params) { |
| 62 } | 62 } |
| 63 | 63 |
| 64 virtual int OnHeadersReceived( | 64 virtual int OnHeadersReceived( |
| 65 URLRequest* request, | 65 URLRequest* request, |
| 66 const net::CompletionCallback& callback, | 66 const net::CompletionCallback& callback, |
| 67 const HttpResponseHeaders* original_response_headers, | 67 const HttpResponseHeaders* original_response_headers, |
| 68 scoped_refptr<HttpResponseHeaders>* override_response_headers, | 68 scoped_refptr<HttpResponseHeaders>* override_response_headers, |
| 69 GURL* allowed_unsafe_redirect_url) OVERRIDE { | 69 GURL* allowed_unsafe_redirect_url) OVERRIDE { |
| 70 data_reduction_proxy::MaybeBypassProxyAndPrepareToRetry( | 70 data_reduction_proxy::MaybeBypassProxyAndPrepareToRetry( |
| 71 NULL, | |
|
bengr
2014/07/16 01:40:10
You should also test that if you pass in non-NULL,
| |
| 71 test_data_reduction_proxy_params_, | 72 test_data_reduction_proxy_params_, |
| 72 request, | 73 request, |
| 73 original_response_headers, | 74 original_response_headers, |
| 74 override_response_headers); | 75 override_response_headers); |
| 75 return net::OK; | 76 return net::OK; |
| 76 } | 77 } |
| 77 | 78 |
| 78 TestDataReductionProxyParams* test_data_reduction_proxy_params_; | 79 TestDataReductionProxyParams* test_data_reduction_proxy_params_; |
| 79 }; | 80 }; |
| 80 | 81 |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 684 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; | 685 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; |
| 685 | 686 |
| 686 OnResolveProxyHandler(url, load_flags, &test_params, &info2); | 687 OnResolveProxyHandler(url, load_flags, &test_params, &info2); |
| 687 EXPECT_FALSE(info2.is_direct()); | 688 EXPECT_FALSE(info2.is_direct()); |
| 688 | 689 |
| 689 OnResolveProxyHandler(url, load_flags, &test_params, &info1); | 690 OnResolveProxyHandler(url, load_flags, &test_params, &info1); |
| 690 EXPECT_TRUE(info1.is_direct()); | 691 EXPECT_TRUE(info1.is_direct()); |
| 691 } | 692 } |
| 692 | 693 |
| 693 } // namespace data_reduction_proxy | 694 } // namespace data_reduction_proxy |
| OLD | NEW |