| 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 "content/browser/loader/navigation_url_loader_delegate.h" | 7 #include "content/browser/loader/navigation_url_loader_delegate.h" |
| 8 #include "content/common/service_worker/service_worker_types.h" |
| 8 #include "content/public/browser/stream_handle.h" | 9 #include "content/public/browser/stream_handle.h" |
| 9 #include "content/public/common/resource_response.h" | 10 #include "content/public/common/resource_response.h" |
| 10 #include "net/url_request/redirect_info.h" | 11 #include "net/url_request/redirect_info.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 TestNavigationURLLoader::TestNavigationURLLoader( | 15 TestNavigationURLLoader::TestNavigationURLLoader( |
| 15 scoped_ptr<NavigationRequestInfo> request_info, | 16 scoped_ptr<NavigationRequestInfo> request_info, |
| 16 NavigationURLLoaderDelegate* delegate) | 17 NavigationURLLoaderDelegate* delegate) |
| 17 : request_info_(request_info.Pass()), | 18 : request_info_(request_info.Pass()), |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 | 36 |
| 36 void TestNavigationURLLoader::CallOnRequestRedirected( | 37 void TestNavigationURLLoader::CallOnRequestRedirected( |
| 37 const net::RedirectInfo& redirect_info, | 38 const net::RedirectInfo& redirect_info, |
| 38 const scoped_refptr<ResourceResponse>& response) { | 39 const scoped_refptr<ResourceResponse>& response) { |
| 39 delegate_->OnRequestRedirected(redirect_info, response); | 40 delegate_->OnRequestRedirected(redirect_info, response); |
| 40 } | 41 } |
| 41 | 42 |
| 42 void TestNavigationURLLoader::CallOnResponseStarted( | 43 void TestNavigationURLLoader::CallOnResponseStarted( |
| 43 const scoped_refptr<ResourceResponse>& response, | 44 const scoped_refptr<ResourceResponse>& response, |
| 44 scoped_ptr<StreamHandle> body) { | 45 scoped_ptr<StreamHandle> body) { |
| 45 delegate_->OnResponseStarted(response, body.Pass()); | 46 delegate_->OnResponseStarted(response, body.Pass(), |
| 47 kInvalidServiceWorkerProviderId); |
| 46 } | 48 } |
| 47 | 49 |
| 48 TestNavigationURLLoader::~TestNavigationURLLoader() {} | 50 TestNavigationURLLoader::~TestNavigationURLLoader() {} |
| 49 | 51 |
| 50 } // namespace content | 52 } // namespace content |
| OLD | NEW |