diff options
author | mlloyd@chromium.org <mlloyd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-05 01:27:34 +0000 |
---|---|---|
committer | mlloyd@chromium.org <mlloyd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-05 01:27:34 +0000 |
commit | c5d793460f95c90ceb9565f5f9e2e81c6f3db8cb (patch) | |
tree | 8f7a1e1b714715c2ec93d68ed86483665d53b6b7 /chrome/renderer | |
parent | 28a64238455dbf32d5c32a523226fa12c2541df1 (diff) | |
download | chromium_src-c5d793460f95c90ceb9565f5f9e2e81c6f3db8cb.zip chromium_src-c5d793460f95c90ceb9565f5f9e2e81c6f3db8cb.tar.gz chromium_src-c5d793460f95c90ceb9565f5f9e2e81c6f3db8cb.tar.bz2 |
Actually clear the disk cache, and keep it enabled, between benchmark runs.
Fixes a small TODO in the benchmarking extension. Keep the disk cache
turned on during benchmarking, and doom all entries between benchmark
runs, rather than disabling it entirely.
BUG=none
TEST=All tests pass.
Review URL: http://codereview.chromium.org/669115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rwxr-xr-x[-rw-r--r--] | chrome/renderer/render_thread.cc | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | chrome/renderer/render_thread.h | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | chrome/renderer/renderer_glue.cc | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 767fc37..d69de4d 100644..100755 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -693,6 +693,11 @@ void RenderThread::SetCacheMode(bool enabled) { Send(new ViewHostMsg_SetCacheMode(enabled)); } +void RenderThread::ClearCache() { + int rv; + Send(new ViewHostMsg_ClearCache(&rv)); +} + void RenderThread::UpdateActiveExtensions() { // In single-process mode, the browser process reports the active extensions. if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h index a02a0b9..d59f4ff 100644..100755 --- a/chrome/renderer/render_thread.h +++ b/chrome/renderer/render_thread.h @@ -174,6 +174,9 @@ class RenderThread : public RenderThreadBase, // Sends a message to the browser to enable or disable the disk cache. void SetCacheMode(bool enabled); + // Sends a message to the browser to clear the disk cache. + void ClearCache(); + // Update the list of active extensions that will be reported when we crash. void UpdateActiveExtensions(); diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index c2b4d0d..87c9049 100644..100755 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -268,6 +268,10 @@ void SetCacheMode(bool enabled) { RenderThread::current()->SetCacheMode(enabled); } +void ClearCache() { + RenderThread::current()->ClearCache(); +} + std::string GetProductVersion() { scoped_ptr<FileVersionInfo> version_info( chrome_app::GetChromeVersionInfo()); |