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

Side by Side Diff: content/browser/loader/sync_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
« no previous file with comments | « content/browser/loader/sync_resource_handler.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/sync_resource_handler.h" 5 #include "content/browser/loader/sync_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/resource_dispatcher_host_impl.h" 9 #include "content/browser/loader/resource_dispatcher_host_impl.h"
10 #include "content/browser/loader/resource_message_filter.h" 10 #include "content/browser/loader/resource_message_filter.h"
(...skipping 23 matching lines...) Expand all
34 if (result_message_) { 34 if (result_message_) {
35 result_message_->set_reply_error(); 35 result_message_->set_reply_error();
36 ResourceMessageFilter* filter = GetFilter(); 36 ResourceMessageFilter* filter = GetFilter();
37 // If the filter doesn't exist at this point, the process has died and isn't 37 // If the filter doesn't exist at this point, the process has died and isn't
38 // waiting for the result message anymore. 38 // waiting for the result message anymore.
39 if (filter) 39 if (filter)
40 filter->Send(result_message_); 40 filter->Send(result_message_);
41 } 41 }
42 } 42 }
43 43
44 bool SyncResourceHandler::OnUploadProgress(uint64 position, uint64 size) {
45 return true;
46 }
47
48 bool SyncResourceHandler::OnRequestRedirected( 44 bool SyncResourceHandler::OnRequestRedirected(
49 const net::RedirectInfo& redirect_info, 45 const net::RedirectInfo& redirect_info,
50 ResourceResponse* response, 46 ResourceResponse* response,
51 bool* defer) { 47 bool* defer) {
52 if (rdh_->delegate()) { 48 if (rdh_->delegate()) {
53 rdh_->delegate()->OnRequestRedirected( 49 rdh_->delegate()->OnRequestRedirected(
54 redirect_info.new_url, request(), GetRequestInfo()->GetContext(), 50 redirect_info.new_url, request(), GetRequestInfo()->GetContext(),
55 response); 51 response);
56 } 52 }
57 53
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 result_message_ = NULL; 133 result_message_ = NULL;
138 return; 134 return;
139 } 135 }
140 136
141 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { 137 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) {
142 // Sync requests don't involve ResourceMsg_DataDownloaded messages 138 // Sync requests don't involve ResourceMsg_DataDownloaded messages
143 // being sent back to renderers as progress is made. 139 // being sent back to renderers as progress is made.
144 } 140 }
145 141
146 } // namespace content 142 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/sync_resource_handler.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698