Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: content/browser/loader/navigation_resource_handler.cc

Issue 1301103002: moved upload progress logic from ResourceLoader to AsyncResourceHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single quotes, nits, and return success on success Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_resource_handler.h ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698