| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/loader/mojo_async_resource_handler.h" | 5 #include "content/browser/loader/mojo_async_resource_handler.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 : public MojoAsyncResourceHandler { | 179 : public MojoAsyncResourceHandler { |
| 180 public: | 180 public: |
| 181 MojoAsyncResourceHandlerWithStubOperations( | 181 MojoAsyncResourceHandlerWithStubOperations( |
| 182 net::URLRequest* request, | 182 net::URLRequest* request, |
| 183 ResourceDispatcherHostImpl* rdh, | 183 ResourceDispatcherHostImpl* rdh, |
| 184 mojom::URLLoaderAssociatedRequest mojo_request, | 184 mojom::URLLoaderAssociatedRequest mojo_request, |
| 185 mojom::URLLoaderClientAssociatedPtr url_loader_client) | 185 mojom::URLLoaderClientAssociatedPtr url_loader_client) |
| 186 : MojoAsyncResourceHandler(request, | 186 : MojoAsyncResourceHandler(request, |
| 187 rdh, | 187 rdh, |
| 188 std::move(mojo_request), | 188 std::move(mojo_request), |
| 189 std::move(url_loader_client)) {} | 189 std::move(url_loader_client), |
| 190 RESOURCE_TYPE_MAIN_FRAME) {} |
| 190 ~MojoAsyncResourceHandlerWithStubOperations() override {} | 191 ~MojoAsyncResourceHandlerWithStubOperations() override {} |
| 191 | 192 |
| 192 void ResetBeginWriteExpectation() { is_begin_write_expectation_set_ = false; } | 193 void ResetBeginWriteExpectation() { is_begin_write_expectation_set_ = false; } |
| 193 | 194 |
| 194 void set_begin_write_expectation(MojoResult begin_write_expectation) { | 195 void set_begin_write_expectation(MojoResult begin_write_expectation) { |
| 195 is_begin_write_expectation_set_ = true; | 196 is_begin_write_expectation_set_ = true; |
| 196 begin_write_expectation_ = begin_write_expectation; | 197 begin_write_expectation_ = begin_write_expectation; |
| 197 } | 198 } |
| 198 void set_end_write_expectation(MojoResult end_write_expectation) { | 199 void set_end_write_expectation(MojoResult end_write_expectation) { |
| 199 is_end_write_expectation_set_ = true; | 200 is_end_write_expectation_set_ = true; |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 } | 1116 } |
| 1116 } | 1117 } |
| 1117 EXPECT_EQ("B", body); | 1118 EXPECT_EQ("B", body); |
| 1118 } | 1119 } |
| 1119 | 1120 |
| 1120 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, | 1121 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, |
| 1121 MojoAsyncResourceHandlerWithAllocationSizeTest, | 1122 MojoAsyncResourceHandlerWithAllocationSizeTest, |
| 1122 ::testing::Values(8, 32 * 2014)); | 1123 ::testing::Values(8, 32 * 2014)); |
| 1123 } // namespace | 1124 } // namespace |
| 1124 } // namespace content | 1125 } // namespace content |
| OLD | NEW |