| 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 6637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6648 const std::string& type, | 6648 const std::string& type, |
| 6649 std::unique_ptr<const base::Value> body) override { | 6649 std::unique_ptr<const base::Value> body) override { |
| 6650 NOTIMPLEMENTED(); | 6650 NOTIMPLEMENTED(); |
| 6651 } | 6651 } |
| 6652 | 6652 |
| 6653 void ProcessHeader(const GURL& url, | 6653 void ProcessHeader(const GURL& url, |
| 6654 const std::string& header_value) override { | 6654 const std::string& header_value) override { |
| 6655 headers_.push_back({url, header_value}); | 6655 headers_.push_back({url, header_value}); |
| 6656 } | 6656 } |
| 6657 | 6657 |
| 6658 void RemoveBrowsingData( |
| 6659 int data_type_mask, |
| 6660 base::Callback<bool(const GURL&)> origin_filter) override { |
| 6661 NOTIMPLEMENTED(); |
| 6662 } |
| 6663 |
| 6658 private: | 6664 private: |
| 6659 std::vector<Header> headers_; | 6665 std::vector<Header> headers_; |
| 6660 }; | 6666 }; |
| 6661 | 6667 |
| 6662 std::unique_ptr<test_server::HttpResponse> SendReportToHeader( | 6668 std::unique_ptr<test_server::HttpResponse> SendReportToHeader( |
| 6663 const test_server::HttpRequest& request) { | 6669 const test_server::HttpRequest& request) { |
| 6664 std::unique_ptr<test_server::BasicHttpResponse> http_response( | 6670 std::unique_ptr<test_server::BasicHttpResponse> http_response( |
| 6665 new test_server::BasicHttpResponse); | 6671 new test_server::BasicHttpResponse); |
| 6666 http_response->set_code(HTTP_OK); | 6672 http_response->set_code(HTTP_OK); |
| 6667 http_response->AddCustomHeader("Report-To", "foo"); | 6673 http_response->AddCustomHeader("Report-To", "foo"); |
| (...skipping 4399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11067 AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 11073 AddTestInterceptor()->set_main_intercept_job(std::move(job)); |
| 11068 | 11074 |
| 11069 req->Start(); | 11075 req->Start(); |
| 11070 req->Cancel(); | 11076 req->Cancel(); |
| 11071 base::RunLoop().RunUntilIdle(); | 11077 base::RunLoop().RunUntilIdle(); |
| 11072 EXPECT_EQ(ERR_ABORTED, d.request_status()); | 11078 EXPECT_EQ(ERR_ABORTED, d.request_status()); |
| 11073 EXPECT_EQ(0, d.received_redirect_count()); | 11079 EXPECT_EQ(0, d.received_redirect_count()); |
| 11074 } | 11080 } |
| 11075 | 11081 |
| 11076 } // namespace net | 11082 } // namespace net |
| OLD | NEW |