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

Unified Diff: chrome/browser/automation/url_request_automation_job.cc

Issue 10825073: Stop using ScopedAllowIO in content::ResourceDispatcherHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove const Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/url_request_automation_job.h ('k') | chrome/common/automation_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/url_request_automation_job.cc
diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc
index f7cd433c194628715404e0293c0bfc0f23c1312a..a5c790d09072eae3091a6b509104ee23df2f0a93 100644
--- a/chrome/browser/automation/url_request_automation_job.cc
+++ b/chrome/browser/automation/url_request_automation_job.cc
@@ -65,6 +65,7 @@ URLRequestAutomationJob::URLRequestAutomationJob(
redirect_status_(0),
request_id_(request_id),
is_pending_(is_pending),
+ upload_size_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
DVLOG(1) << "URLRequestAutomationJob create. Count: " << ++instance_count_;
DCHECK(message_filter_ != NULL);
@@ -232,17 +233,15 @@ bool URLRequestAutomationJob::IsRedirectResponse(
return true;
}
-uint64 URLRequestAutomationJob::GetUploadProgress() const {
+net::UploadProgress URLRequestAutomationJob::GetUploadProgress() const {
+ uint64 progress = 0;
if (request_ && request_->status().is_success()) {
// We don't support incremental progress notifications in ChromeFrame. When
// we receive a response for the POST request from Chromeframe, it means
// that the upload is fully complete.
- const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
- if (info) {
- return info->GetUploadSize();
- }
+ progress = upload_size_;
}
- return 0;
+ return net::UploadProgress(progress, upload_size_);
}
net::HostPortPair URLRequestAutomationJob::GetSocketAddress() const {
@@ -305,6 +304,7 @@ void URLRequestAutomationJob::OnRequestStarted(
response.headers.size()));
}
socket_address_ = response.socket_address;
+ upload_size_ = response.upload_size;
NotifyHeadersComplete();
}
« no previous file with comments | « chrome/browser/automation/url_request_automation_job.h ('k') | chrome/common/automation_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698