| 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 "content/browser/loader/navigation_resource_handler.h" | 5 #include "content/browser/loader/navigation_resource_handler.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/devtools/devtools_netlog_observer.h" | 8 #include "content/browser/devtools/devtools_netlog_observer.h" |
| 9 #include "content/browser/loader/navigation_url_loader_impl_core.h" | 9 #include "content/browser/loader/navigation_url_loader_impl_core.h" |
| 10 #include "content/browser/loader/resource_request_info_impl.h" | 10 #include "content/browser/loader/resource_request_info_impl.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 void NavigationResourceHandler::FollowRedirect() { | 43 void NavigationResourceHandler::FollowRedirect() { |
| 44 controller()->Resume(); | 44 controller()->Resume(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void NavigationResourceHandler::SetController(ResourceController* controller) { | 47 void NavigationResourceHandler::SetController(ResourceController* controller) { |
| 48 writer_.set_controller(controller); | 48 writer_.set_controller(controller); |
| 49 ResourceHandler::SetController(controller); | 49 ResourceHandler::SetController(controller); |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool NavigationResourceHandler::OnUploadProgress(uint64 position, uint64 size) { | |
| 53 return true; | |
| 54 } | |
| 55 | |
| 56 bool NavigationResourceHandler::OnRequestRedirected( | 52 bool NavigationResourceHandler::OnRequestRedirected( |
| 57 const net::RedirectInfo& redirect_info, | 53 const net::RedirectInfo& redirect_info, |
| 58 ResourceResponse* response, | 54 ResourceResponse* response, |
| 59 bool* defer) { | 55 bool* defer) { |
| 60 DCHECK(core_); | 56 DCHECK(core_); |
| 61 | 57 |
| 62 // TODO(davidben): Perform a CSP check here, and anything else that would have | 58 // TODO(davidben): Perform a CSP check here, and anything else that would have |
| 63 // been done renderer-side. | 59 // been done renderer-side. |
| 64 DevToolsNetLogObserver::PopulateResponseInfo(request(), response); | 60 DevToolsNetLogObserver::PopulateResponseInfo(request(), response); |
| 65 core_->NotifyRequestRedirected(redirect_info, response); | 61 core_->NotifyRequestRedirected(redirect_info, response); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 NOTREACHED(); | 138 NOTREACHED(); |
| 143 } | 139 } |
| 144 | 140 |
| 145 void NavigationResourceHandler::DetachFromCore() { | 141 void NavigationResourceHandler::DetachFromCore() { |
| 146 DCHECK(core_); | 142 DCHECK(core_); |
| 147 core_->set_resource_handler(nullptr); | 143 core_->set_resource_handler(nullptr); |
| 148 core_ = nullptr; | 144 core_ = nullptr; |
| 149 } | 145 } |
| 150 | 146 |
| 151 } // namespace content | 147 } // namespace content |
| OLD | NEW |