summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/appcache_response.cc
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-18 23:27:27 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-18 23:27:27 +0000
commit1ededee8107fd0e40e6371a5d35f7d2b451ca433 (patch)
treee180d5419e246f0f3bb69ba274d7abcf409741f9 /webkit/appcache/appcache_response.cc
parent5510cff445f38b167c8ca9c734e9311fd0505212 (diff)
downloadchromium_src-1ededee8107fd0e40e6371a5d35f7d2b451ca433.zip
chromium_src-1ededee8107fd0e40e6371a5d35f7d2b451ca433.tar.gz
chromium_src-1ededee8107fd0e40e6371a5d35f7d2b451ca433.tar.bz2
Put appcache storage on disk and add a means of disabling the appcache system when certain error conditions arise.
TEST=existing tests apply BUG=none Review URL: http://codereview.chromium.org/542071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache_response.cc')
-rw-r--r--webkit/appcache/appcache_response.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_response.cc b/webkit/appcache/appcache_response.cc
index c16bd5c..f9af38e 100644
--- a/webkit/appcache/appcache_response.cc
+++ b/webkit/appcache/appcache_response.cc
@@ -202,7 +202,7 @@ void AppCacheResponseReader::OnIOComplete(int result) {
}
bool AppCacheResponseReader::OpenEntryIfNeeded() {
- if (!entry_)
+ if (!entry_ && disk_cache_)
disk_cache_->OpenEntry(response_key(response_id_), &entry_);
return entry_ ? true : false;
}
@@ -265,6 +265,8 @@ void AppCacheResponseWriter::OnIOComplete(int result) {
bool AppCacheResponseWriter::CreateEntryIfNeeded() {
if (entry_)
return true;
+ if (!disk_cache_)
+ return false;
std::string key(response_key(response_id_));
if (!disk_cache_->CreateEntry(key, &entry_)) {
// We may try to overrite existing entries.