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

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: Chrome Frame fix 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
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 f5856bd2409f3643327f9fa12f198e53514c17a0..7adea5dd4119e69f646dc50f018ffef5daa0811c 100644
--- a/chrome/browser/automation/url_request_automation_job.cc
+++ b/chrome/browser/automation/url_request_automation_job.cc
@@ -64,6 +64,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);
@@ -234,10 +235,7 @@ uint64 URLRequestAutomationJob::GetUploadProgress() const {
// 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();
- }
+ return upload_size_;
}
return 0;
}
@@ -302,6 +300,10 @@ void URLRequestAutomationJob::OnRequestStarted(
response.headers.size()));
}
socket_address_ = response.socket_address;
+ upload_size_ = response.upload_size;
+ // Notify upload size to delegate.
+ request_->NotifyRequestBodyInitialized(upload_size_);
+
NotifyHeadersComplete();
}

Powered by Google App Engine
This is Rietveld 408576698