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

Side by Side Diff: content/browser/loader/layered_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/layered_resource_handler.h" 5 #include "content/browser/loader/layered_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 11 matching lines...) Expand all
22 ResourceHandler::SetController(controller); 22 ResourceHandler::SetController(controller);
23 23
24 // Pass the controller down to the next handler. This method is intended to 24 // Pass the controller down to the next handler. This method is intended to
25 // be overriden by subclasses of LayeredResourceHandler that need to insert a 25 // be overriden by subclasses of LayeredResourceHandler that need to insert a
26 // different ResourceController. 26 // different ResourceController.
27 27
28 DCHECK(next_handler_.get()); 28 DCHECK(next_handler_.get());
29 next_handler_->SetController(controller); 29 next_handler_->SetController(controller);
30 } 30 }
31 31
32 bool LayeredResourceHandler::OnUploadProgress(uint64 position,
33 uint64 size) {
34 DCHECK(next_handler_.get());
35 return next_handler_->OnUploadProgress(position, size);
36 }
37
38 bool LayeredResourceHandler::OnRequestRedirected( 32 bool LayeredResourceHandler::OnRequestRedirected(
39 const net::RedirectInfo& redirect_info, 33 const net::RedirectInfo& redirect_info,
40 ResourceResponse* response, 34 ResourceResponse* response,
41 bool* defer) { 35 bool* defer) {
42 DCHECK(next_handler_.get()); 36 DCHECK(next_handler_.get());
43 return next_handler_->OnRequestRedirected(redirect_info, response, defer); 37 return next_handler_->OnRequestRedirected(redirect_info, response, defer);
44 } 38 }
45 39
46 bool LayeredResourceHandler::OnResponseStarted(ResourceResponse* response, 40 bool LayeredResourceHandler::OnResponseStarted(ResourceResponse* response,
47 bool* defer) { 41 bool* defer) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 DCHECK(next_handler_.get()); 74 DCHECK(next_handler_.get());
81 next_handler_->OnResponseCompleted(status, security_info, defer); 75 next_handler_->OnResponseCompleted(status, security_info, defer);
82 } 76 }
83 77
84 void LayeredResourceHandler::OnDataDownloaded(int bytes_downloaded) { 78 void LayeredResourceHandler::OnDataDownloaded(int bytes_downloaded) {
85 DCHECK(next_handler_.get()); 79 DCHECK(next_handler_.get());
86 next_handler_->OnDataDownloaded(bytes_downloaded); 80 next_handler_->OnDataDownloaded(bytes_downloaded);
87 } 81 }
88 82
89 } // namespace content 83 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/layered_resource_handler.h ('k') | content/browser/loader/mime_type_resource_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698