diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-06 03:50:42 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-06 03:50:42 +0000 |
commit | ee3cd175f8592b2b1f2ccd14b071d56ca733a5c6 (patch) | |
tree | 87a1e45bb6e93e1140a8719681fb653464bcea5e /webkit/appcache/appcache.cc | |
parent | fd4882e6faab19e1de6d791acebfa3b34faf5701 (diff) | |
download | chromium_src-ee3cd175f8592b2b1f2ccd14b071d56ca733a5c6.zip chromium_src-ee3cd175f8592b2b1f2ccd14b071d56ca733a5c6.tar.gz chromium_src-ee3cd175f8592b2b1f2ccd14b071d56ca733a5c6.tar.bz2 |
Revert 35609 - AppCache quota tracking groundwork, store response sizes in the SQL database.
TEST=updated existing unittests
BUG=none
Review URL: http://codereview.chromium.org/523046
TBR=michaeln@chromium.org
Review URL: http://codereview.chromium.org/525059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/appcache.cc')
-rw-r--r-- | webkit/appcache/appcache.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/webkit/appcache/appcache.cc b/webkit/appcache/appcache.cc index e1819d4..ec00cc4 100644 --- a/webkit/appcache/appcache.cc +++ b/webkit/appcache/appcache.cc @@ -44,15 +44,13 @@ void AppCache::AddEntry(const GURL& url, const AppCacheEntry& entry) { entries_.insert(EntryMap::value_type(url, entry)); } -bool AppCache::AddOrModifyEntry(const GURL& url, const AppCacheEntry& entry) { +void AppCache::AddOrModifyEntry(const GURL& url, const AppCacheEntry& entry) { std::pair<EntryMap::iterator, bool> ret = entries_.insert(EntryMap::value_type(url, entry)); // Entry already exists. Merge the types of the new and existing entries. if (!ret.second) ret.first->second.add_types(entry.types()); - - return ret.second; } AppCacheEntry* AppCache::GetEntry(const GURL& url) { @@ -92,8 +90,7 @@ void AppCache::InitializeWithDatabaseRecords( for (size_t i = 0; i < entries.size(); ++i) { const AppCacheDatabase::EntryRecord& entry = entries.at(i); - AddEntry(entry.url, AppCacheEntry(entry.flags, entry.response_id, - entry.response_size)); + AddEntry(entry.url, AppCacheEntry(entry.flags, entry.response_id)); } for (size_t i = 0; i < fallbacks.size(); ++i) { @@ -127,7 +124,6 @@ void AppCache::ToDatabaseRecords( cache_record->group_id = group->group_id(); cache_record->online_wildcard = online_whitelist_all_; cache_record->update_time = update_time_; - cache_record->cache_size = 0; for (EntryMap::const_iterator iter = entries_.begin(); iter != entries_.end(); ++iter) { @@ -137,8 +133,6 @@ void AppCache::ToDatabaseRecords( record.cache_id = cache_id_; record.flags = iter->second.types(); record.response_id = iter->second.response_id(); - record.response_size = iter->second.response_size(); - cache_record->cache_size += record.response_size; } GURL origin = group->manifest_url().GetOrigin(); |