diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 00:00:16 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-08 00:00:16 +0000 |
commit | 02922607a93d8c0f689c11feaef349399650f7bb (patch) | |
tree | 0f4b2d5f81c7cc16bac5b76a7821920a11fbdba4 /chrome/browser/automation | |
parent | 07db0d7a54005cc4d0d69ae8cb6f001aa2408cd2 (diff) | |
download | chromium_src-02922607a93d8c0f689c11feaef349399650f7bb.zip chromium_src-02922607a93d8c0f689c11feaef349399650f7bb.tar.gz chromium_src-02922607a93d8c0f689c11feaef349399650f7bb.tar.bz2 |
Support XHR upload event notifications in Chromeframe. We don't get incremental progress
notifications from IE indicating how much data was uploaded etc. We just fire one notification
indicating that upload was completed when queried from Chrome.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=70713
BUG=70713
TEST=As described in the bug
Review URL: http://codereview.chromium.org/6246159
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/url_request_automation_job.cc | 14 | ||||
-rw-r--r-- | chrome/browser/automation/url_request_automation_job.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc index 97f48c0..cd5db32 100644 --- a/chrome/browser/automation/url_request_automation_job.cc +++ b/chrome/browser/automation/url_request_automation_job.cc @@ -234,6 +234,20 @@ bool URLRequestAutomationJob::IsRedirectResponse( return true; } +uint64 URLRequestAutomationJob::GetUploadProgress() const { + 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. + ResourceDispatcherHostRequestInfo* request_info = + ResourceDispatcherHost::InfoForRequest(request_); + if (request_info) { + return request_info->upload_size(); + } + } + return 0; +} + bool URLRequestAutomationJob::MayFilterMessage(const IPC::Message& message, int* request_id) { switch (message.type()) { diff --git a/chrome/browser/automation/url_request_automation_job.h b/chrome/browser/automation/url_request_automation_job.h index 61e5dc2..9dab13a 100644 --- a/chrome/browser/automation/url_request_automation_job.h +++ b/chrome/browser/automation/url_request_automation_job.h @@ -45,6 +45,7 @@ class URLRequestAutomationJob : public net::URLRequestJob { virtual void GetResponseInfo(net::HttpResponseInfo* info); virtual int GetResponseCode() const; virtual bool IsRedirectResponse(GURL* location, int* http_status_code); + virtual uint64 GetUploadProgress() const; // Peek and process automation messages for URL requests. static bool MayFilterMessage(const IPC::Message& message, int* request_id); |