Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Unified Diff: webkit/appcache/appcache_update_job.cc

Issue 8343018: More groundwork for flat file based response storage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/appcache/appcache_storage_impl_unittest.cc ('k') | webkit/appcache/appcache_update_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_update_job.cc
===================================================================
--- webkit/appcache/appcache_update_job.cc (revision 106339)
+++ webkit/appcache/appcache_update_job.cc (working copy)
@@ -382,7 +382,8 @@
AppCacheResponseWriter* AppCacheUpdateJob::CreateResponseWriter() {
AppCacheResponseWriter* writer =
- service_->storage()->CreateResponseWriter(manifest_url_);
+ service_->storage()->CreateResponseWriter(manifest_url_,
+ group_->group_id());
stored_response_ids_.push_back(writer->response_id());
return writer;
}
@@ -414,7 +415,7 @@
group_->newest_complete_cache()->GetEntry(manifest_url_) : NULL;
if (entry) {
// Asynchronously load response info for manifest from newest cache.
- service_->storage()->LoadResponseInfo(manifest_url_,
+ service_->storage()->LoadResponseInfo(manifest_url_, group_->group_id(),
entry->response_id(), this);
} else {
manifest_fetcher_->Start();
@@ -561,6 +562,11 @@
if (!inprogress_cache_->AddOrModifyEntry(url, entry))
duplicate_response_ids_.push_back(entry.response_id());
+ // TODO(michaeln): Check for <html manifest=xxx>
+ // See http://code.google.com/p/chromium/issues/detail?id=97930
+ // if (entry.IsMaster() && !entry.IsExplicit())
+ // if (!manifestAttribute) skip it
+
// Foreign entries will be detected during cache selection.
// Note: 6.9.4, step 17.9 possible optimization: if resource is HTML or XML
// file whose root element is an html element with a manifest attribute
@@ -848,6 +854,7 @@
// Load manifest data from storage to compare against fetched manifest.
manifest_response_reader_.reset(
service_->storage()->CreateResponseReader(manifest_url_,
+ group_->group_id(),
entry->response_id()));
read_manifest_buffer_ = new net::IOBuffer(kBufferSize);
manifest_response_reader_->ReadData(read_manifest_buffer_, kBufferSize,
@@ -1111,7 +1118,8 @@
// Load HTTP headers for entry from newest cache.
loading_responses_.insert(
LoadingResponses::value_type(copy_me->response_id(), url));
- service_->storage()->LoadResponseInfo(manifest_url_, copy_me->response_id(),
+ service_->storage()->LoadResponseInfo(manifest_url_, group_->group_id(),
+ copy_me->response_id(),
this);
// Async: wait for OnResponseInfoLoaded to complete.
return true;
« no previous file with comments | « webkit/appcache/appcache_storage_impl_unittest.cc ('k') | webkit/appcache/appcache_update_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698