diff options
author | Steve Block <steveblock@google.com> | 2011-01-06 17:36:11 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-01-14 16:47:02 +0000 |
commit | bf16cf132cbd54cc70f003ec6f7500e3dd39dbbb (patch) | |
tree | 392bf8f86b58450ca90f97d0a454e199a863dbef /WebKit/android/WebCoreSupport/WebCache.h | |
parent | 477950e01e53312a3b7c330e518dc9c8f65f7dc6 (diff) | |
download | external_webkit-bf16cf132cbd54cc70f003ec6f7500e3dd39dbbb.zip external_webkit-bf16cf132cbd54cc70f003ec6f7500e3dd39dbbb.tar.gz external_webkit-bf16cf132cbd54cc70f003ec6f7500e3dd39dbbb.tar.bz2 |
Hook up CacheManager for the Chromium HTTP stack
Requires a corresponding change in frameworks/base
https://android-git.corp.google.com/g/87939
Bug: 3270236
Change-Id: I31a640de86d6fad00eb8b71784e0ee9136ab1174
Diffstat (limited to 'WebKit/android/WebCoreSupport/WebCache.h')
-rw-r--r-- | WebKit/android/WebCoreSupport/WebCache.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/WebCache.h b/WebKit/android/WebCoreSupport/WebCache.h index d89cba7..7149fcc 100644 --- a/WebKit/android/WebCoreSupport/WebCache.h +++ b/WebKit/android/WebCoreSupport/WebCache.h @@ -26,9 +26,11 @@ #ifndef WebCache_h #define WebCache_h +#include "CacheResult.h" #include "ChromiumIncludes.h" #include <OwnPtr.h> +#include <platform/text/PlatformString.h> #include <wtf/ThreadingPrimitives.h> namespace android { @@ -41,6 +43,7 @@ public: static void cleanup(bool isPrivateBrowsing); void clear(); + scoped_refptr<CacheResult> getCacheResult(WTF::String url); net::HostResolver* hostResolver() { return m_hostResolver.get(); } net::HttpCache* cache() { return m_cache.get(); } net::ProxyConfigServiceAndroid* proxy() { return m_proxyConfigService; } @@ -53,6 +56,11 @@ private: void doomAllEntries(int); void onClearDone(int); + // For getEntry() + void getEntryImpl(); + void openEntry(int); + void onGetEntryDone(int); + OwnPtr<net::HostResolver> m_hostResolver; OwnPtr<net::HttpCache> m_cache; // This is owned by the ProxyService, which is owned by the HttpNetworkLayer, @@ -62,8 +70,17 @@ private: // For clear() net::CompletionCallbackImpl<WebCache> m_doomAllEntriesCallback; net::CompletionCallbackImpl<WebCache> m_onClearDoneCallback; - disk_cache::Backend* m_cacheBackend; bool m_isClearInProgress; + // For getEntry() + net::CompletionCallbackImpl<WebCache> m_openEntryCallback; + net::CompletionCallbackImpl<WebCache> m_onGetEntryDoneCallback; + bool m_isGetEntryInProgress; + String m_entryUrl; + disk_cache::Entry* m_entry; + WTF::Mutex m_getEntryMutex; + WTF::ThreadCondition m_getEntryCondition; + + disk_cache::Backend* m_cacheBackend; }; } // namespace android |