OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/test/test_navigation_url_loader.h" | 5 #include "content/test/test_navigation_url_loader.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/loader/navigation_url_loader_delegate.h" | 9 #include "content/browser/loader/navigation_url_loader_delegate.h" |
10 #include "content/public/browser/navigation_data.h" | 10 #include "content/public/browser/navigation_data.h" |
11 #include "content/public/browser/stream_handle.h" | 11 #include "content/public/browser/stream_handle.h" |
12 #include "content/public/common/resource_response.h" | 12 #include "content/public/common/resource_response.h" |
| 13 #include "content/public/common/ssl_status.h" |
13 #include "net/url_request/redirect_info.h" | 14 #include "net/url_request/redirect_info.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 TestNavigationURLLoader::TestNavigationURLLoader( | 18 TestNavigationURLLoader::TestNavigationURLLoader( |
18 std::unique_ptr<NavigationRequestInfo> request_info, | 19 std::unique_ptr<NavigationRequestInfo> request_info, |
19 NavigationURLLoaderDelegate* delegate) | 20 NavigationURLLoaderDelegate* delegate) |
20 : request_info_(std::move(request_info)), | 21 : request_info_(std::move(request_info)), |
21 delegate_(delegate), | 22 delegate_(delegate), |
22 redirect_count_(0), | 23 redirect_count_(0), |
(...skipping 24 matching lines...) Expand all Loading... |
47 void TestNavigationURLLoader::CallOnRequestRedirected( | 48 void TestNavigationURLLoader::CallOnRequestRedirected( |
48 const net::RedirectInfo& redirect_info, | 49 const net::RedirectInfo& redirect_info, |
49 const scoped_refptr<ResourceResponse>& response) { | 50 const scoped_refptr<ResourceResponse>& response) { |
50 delegate_->OnRequestRedirected(redirect_info, response); | 51 delegate_->OnRequestRedirected(redirect_info, response); |
51 } | 52 } |
52 | 53 |
53 void TestNavigationURLLoader::CallOnResponseStarted( | 54 void TestNavigationURLLoader::CallOnResponseStarted( |
54 const scoped_refptr<ResourceResponse>& response, | 55 const scoped_refptr<ResourceResponse>& response, |
55 std::unique_ptr<StreamHandle> body, | 56 std::unique_ptr<StreamHandle> body, |
56 std::unique_ptr<NavigationData> navigation_data) { | 57 std::unique_ptr<NavigationData> navigation_data) { |
57 delegate_->OnResponseStarted(response, std::move(body), | 58 delegate_->OnResponseStarted(response, std::move(body), SSLStatus(), |
58 std::move(navigation_data)); | 59 std::move(navigation_data)); |
59 } | 60 } |
60 | 61 |
61 TestNavigationURLLoader::~TestNavigationURLLoader() {} | 62 TestNavigationURLLoader::~TestNavigationURLLoader() {} |
62 | 63 |
63 } // namespace content | 64 } // namespace content |
OLD | NEW |