| 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 8b41e57c54151dc9dada0ffb5736f99c6e652651..c985ff4f64593619fc432a758eb734419ce76a2e 100644
|
| --- a/chrome/browser/automation/url_request_automation_job.cc
|
| +++ b/chrome/browser/automation/url_request_automation_job.cc
|
| @@ -229,17 +229,22 @@ bool URLRequestAutomationJob::IsRedirectResponse(
|
| return true;
|
| }
|
|
|
| -uint64 URLRequestAutomationJob::GetUploadProgress() const {
|
| - if (request_ && request_->status().is_success()) {
|
| +net::UploadProgress URLRequestAutomationJob::GetUploadProgress() const {
|
| + if (!request_)
|
| + return net::UploadProgress();
|
| +
|
| + const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
|
| + if (!info)
|
| + return net::UploadProgress();
|
| +
|
| + const uint64 size = info->GetUploadSize();
|
| + if (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();
|
| - }
|
| + return net::UploadProgress(size, size);
|
| }
|
| - return 0;
|
| + return net::UploadProgress(0, size);
|
| }
|
|
|
| net::HostPortPair URLRequestAutomationJob::GetSocketAddress() const {
|
|
|