summaryrefslogtreecommitdiffstats
path: root/webkit/browser
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-06 03:13:40 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-06 03:13:40 +0000
commit8022ed59d498755730a7c2d290596b48458b4f62 (patch)
tree8dbb5ceacf44cdbfb642f8a2b0c8264da7ae16f8 /webkit/browser
parentaac7bba382b851f42d2219bfd780d80ed9f2becc (diff)
downloadchromium_src-8022ed59d498755730a7c2d290596b48458b4f62.zip
chromium_src-8022ed59d498755730a7c2d290596b48458b4f62.tar.gz
chromium_src-8022ed59d498755730a7c2d290596b48458b4f62.tar.bz2
ServiceWorker script cache reading
The ContextRequestHandler figures out whether to read, write, or do nothing with the version's script cache. The ReadFromCacheJob does just that when the handler makes the decision to read. The ServiceWorkerVersion maintains a collection of <urls, responseids> that are in its script cache (to be stored with the registration data). The rest of the cl is groundwork to reuse the DiskCache componentry of the appcache library in this context. The DiskCache instance is an in memory only instance for now. Note that since nothing is ever written to this cache yet the read code paths are not reachable yet, so there should be no behavior change. BUG=364321 Review URL: https://codereview.chromium.org/258743002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser')
-rw-r--r--webkit/browser/appcache/appcache_response.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/webkit/browser/appcache/appcache_response.h b/webkit/browser/appcache/appcache_response.h
index 6829fe6..d9695b3 100644
--- a/webkit/browser/appcache/appcache_response.h
+++ b/webkit/browser/appcache/appcache_response.h
@@ -67,7 +67,7 @@ struct WEBKIT_STORAGE_BROWSER_EXPORT HttpResponseInfoIOBuffer
HttpResponseInfoIOBuffer();
explicit HttpResponseInfoIOBuffer(net::HttpResponseInfo* info);
- private:
+ protected:
friend class base::RefCountedThreadSafe<HttpResponseInfoIOBuffer>;
virtual ~HttpResponseInfoIOBuffer();
};
@@ -176,7 +176,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseReader
friend class AppCacheStorageImpl;
friend class content::MockAppCacheStorage;
- // Should only be constructed by the storage class.
+ // Should only be constructed by the storage class and derivatives.
AppCacheResponseReader(int64 response_id,
int64 group_id,
AppCacheDiskCacheInterface* disk_cache);
@@ -230,6 +230,12 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseWriter
// Returns the amount written, info and data.
int64 amount_written() { return info_size_ + write_position_; }
+ protected:
+ // Should only be constructed by the storage class and derivatives.
+ AppCacheResponseWriter(int64 response_id,
+ int64 group_id,
+ AppCacheDiskCacheInterface* disk_cache);
+
private:
friend class AppCacheStorageImpl;
friend class content::MockAppCacheStorage;
@@ -241,11 +247,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheResponseWriter
SECOND_ATTEMPT
};
- // Should only be constructed by the storage class.
- AppCacheResponseWriter(int64 response_id,
- int64 group_id,
- AppCacheDiskCacheInterface* disk_cache);
-
virtual void OnIOComplete(int result) OVERRIDE;
void ContinueWriteInfo();
void ContinueWriteData();