diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 19:41:19 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-12 19:41:19 +0000 |
commit | 906947ffa421dad57b7e56528100846c43bba768 (patch) | |
tree | 0e265fa9d86b7f7a6c3f95d8fdfa65fae48c202f /webkit/appcache | |
parent | a1dadd464c75bb7a35b2fb7f75ed8ff651eac168 (diff) | |
download | chromium_src-906947ffa421dad57b7e56528100846c43bba768.zip chromium_src-906947ffa421dad57b7e56528100846c43bba768.tar.gz chromium_src-906947ffa421dad57b7e56528100846c43bba768.tar.bz2 |
Couple of small AppCache update job mods
1) Fix a bug with failing to deliver the ERROR event in some cases.
2) Use a larger IO buffer to improve download performance.
BUG=none
TEST=manual
Review URL: http://codereview.chromium.org/596078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache')
-rw-r--r-- | webkit/appcache/appcache_update_job.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/webkit/appcache/appcache_update_job.cc b/webkit/appcache/appcache_update_job.cc index 89dcb4f..dcf77b0 100644 --- a/webkit/appcache/appcache_update_job.cc +++ b/webkit/appcache/appcache_update_job.cc @@ -14,7 +14,7 @@ namespace appcache { -static const int kBufferSize = 4096; +static const int kBufferSize = 32768; static const size_t kMaxConcurrentUrlFetches = 2; static const int kMax503Retries = 3; @@ -734,10 +734,16 @@ void AppCacheUpdateJob::OnGroupAndNewestCacheStored(AppCacheGroup* group, AppCache* newest_cache, bool success) { DCHECK(stored_state_ == STORING); - if (success) + if (success) { stored_state_ = STORED; - else + } else { internal_state_ = CACHE_FAILURE; + + // Restore inprogress_cache_ to get the proper events delivered + // and the proper cleanup to occur. + if (newest_cache != group->newest_complete_cache()) + inprogress_cache_ = newest_cache; + } MaybeCompleteUpdate(); // will definitely complete } |