diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-15 23:14:44 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-15 23:14:44 +0000 |
commit | 0e34852ad6c4d5bc35f7000392467837211c9a87 (patch) | |
tree | 7b04317a795dbb0aae584699ad4f4a81d2ee7b3b /chrome/renderer | |
parent | aa042406ccff58edb414117877b669b5ca2d7a32 (diff) | |
download | chromium_src-0e34852ad6c4d5bc35f7000392467837211c9a87.zip chromium_src-0e34852ad6c4d5bc35f7000392467837211c9a87.tar.gz chromium_src-0e34852ad6c4d5bc35f7000392467837211c9a87.tar.bz2 |
Update benchmarking clearCache routine to be able to preserve sslhostinfo:
related entries.
* The clearCache() API is part of the benchmarking extension.
* Modified clearCache() to take an argument so that we can selectively
clear SSL information or not.
* The actual clear data call used to just call DoomAllEntries. It still
does that for clearing everything. If preserving the ssl host entries,
however, it will enumerate the cache. Ran into cache invalidation upon
calling doom, which makes the clear inefficient, but functional.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6529012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_thread.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/render_thread.h | 4 | ||||
-rw-r--r-- | chrome/renderer/renderer_glue.cc | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index fc74a39..85bcddc 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -768,9 +768,9 @@ void RenderThread::SetCacheMode(bool enabled) { Send(new ViewHostMsg_SetCacheMode(enabled)); } -void RenderThread::ClearCache() { +void RenderThread::ClearCache(bool preserve_ssl_host_info) { int rv; - Send(new ViewHostMsg_ClearCache(&rv)); + Send(new ViewHostMsg_ClearCache(preserve_ssl_host_info, &rv)); } void RenderThread::EnableSpdy(bool enable) { diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h index bfb9e55..97bb0ef 100644 --- a/chrome/renderer/render_thread.h +++ b/chrome/renderer/render_thread.h @@ -215,7 +215,9 @@ class RenderThread : public RenderThreadBase, void SetCacheMode(bool enabled); // Sends a message to the browser to clear the disk cache. - void ClearCache(); + // |preserve_ssl_host_info| is a flag indicating if the cache should purge + // entries related to cached SSL information. + void ClearCache(bool preserve_ssl_host_info); // Sends a message to the browser to enable/disable spdy. void EnableSpdy(bool enable); diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index ecbf7f5..7ba91ff 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -256,8 +256,8 @@ void SetCacheMode(bool enabled) { RenderThread::current()->SetCacheMode(enabled); } -void ClearCache() { - RenderThread::current()->ClearCache(); +void ClearCache(bool preserve_ssl_host_info) { + RenderThread::current()->ClearCache(preserve_ssl_host_info); } std::string GetProductVersion() { |