summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_frontend_impl.cc
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 21:15:31 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 21:15:31 +0000
commit697af4a94a9351f6994d9207356930f373cf3a6e (patch)
tree501a3d73683bf94694da5a540c5b6b88501ba961 /webkit/appcache/appcache_frontend_impl.cc
parent2a8132263c53c361e4a7618af889492407dbb8e2 (diff)
downloadchromium_src-697af4a94a9351f6994d9207356930f373cf3a6e.zip
chromium_src-697af4a94a9351f6994d9207356930f373cf3a6e.tar.gz
chromium_src-697af4a94a9351f6994d9207356930f373cf3a6e.tar.bz2
Provide more info to the renderer process in appcache progress events.
BUG=39370 TEST= yes, updated unittests Review URL: http://codereview.chromium.org/2166006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_frontend_impl.cc')
-rw-r--r--webkit/appcache/appcache_frontend_impl.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_frontend_impl.cc b/webkit/appcache/appcache_frontend_impl.cc
index 7a9c1b8..3535bf1 100644
--- a/webkit/appcache/appcache_frontend_impl.cc
+++ b/webkit/appcache/appcache_frontend_impl.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "webkit/appcache/appcache_frontend_impl.h"
+
+#include "base/logging.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
namespace appcache {
@@ -31,6 +33,7 @@ void AppCacheFrontendImpl::OnStatusChanged(const std::vector<int>& host_ids,
void AppCacheFrontendImpl::OnEventRaised(const std::vector<int>& host_ids,
EventID event_id) {
+ DCHECK(event_id != PROGRESS_EVENT); // See OnProgressEventRaised.
for (std::vector<int>::const_iterator i = host_ids.begin();
i != host_ids.end(); ++i) {
WebApplicationCacheHostImpl* host = GetHost(*i);
@@ -39,6 +42,17 @@ void AppCacheFrontendImpl::OnEventRaised(const std::vector<int>& host_ids,
}
}
+void AppCacheFrontendImpl::OnProgressEventRaised(
+ const std::vector<int>& host_ids,
+ const GURL& url, int num_total, int num_complete) {
+ for (std::vector<int>::const_iterator i = host_ids.begin();
+ i != host_ids.end(); ++i) {
+ WebApplicationCacheHostImpl* host = GetHost(*i);
+ if (host)
+ host->OnProgressEventRaised(url, num_total, num_complete);
+ }
+}
+
void AppCacheFrontendImpl::OnContentBlocked(int host_id) {
WebApplicationCacheHostImpl* host = GetHost(host_id);
if (host)