summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authormlloyd@chromium.org <mlloyd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-05 01:27:34 +0000
committermlloyd@chromium.org <mlloyd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-05 01:27:34 +0000
commitc5d793460f95c90ceb9565f5f9e2e81c6f3db8cb (patch)
tree8f7a1e1b714715c2ec93d68ed86483665d53b6b7 /webkit
parent28a64238455dbf32d5c32a523226fa12c2541df1 (diff)
downloadchromium_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 'webkit')
-rwxr-xr-x[-rw-r--r--]webkit/extensions/v8/benchmarking_extension.cc4
-rwxr-xr-x[-rw-r--r--]webkit/glue/webkit_glue.h3
-rwxr-xr-x[-rw-r--r--]webkit/support/webkit_support_glue.cc3
-rwxr-xr-x[-rw-r--r--]webkit/tools/test_shell/test_shell.cc4
4 files changed, 11 insertions, 3 deletions
diff --git a/webkit/extensions/v8/benchmarking_extension.cc b/webkit/extensions/v8/benchmarking_extension.cc
index bac4677..362a928 100644..100755
--- a/webkit/extensions/v8/benchmarking_extension.cc
+++ b/webkit/extensions/v8/benchmarking_extension.cc
@@ -55,9 +55,7 @@ class BenchmarkingWrapper : public v8::Extension {
}
static v8::Handle<v8::Value> ClearCache(const v8::Arguments& args) {
- // TODO(mbelshe): should be enable/disable?
- webkit_glue::SetCacheMode(false);
-
+ webkit_glue::ClearCache();
WebCache::clear();
return v8::Undefined();
}
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index f8095d9..8f6b42c 100644..100755
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -242,6 +242,9 @@ void CloseCurrentConnections();
// Enable or disable the disk cache. Used for debugging.
void SetCacheMode(bool enabled);
+// Clear the disk cache. Used for debugging.
+void ClearCache();
+
// Returns the product version. E.g., Chrome/4.1.333.0
std::string GetProductVersion();
diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc
index 5f11be0..28bf904 100644..100755
--- a/webkit/support/webkit_support_glue.cc
+++ b/webkit/support/webkit_support_glue.cc
@@ -51,6 +51,9 @@ void CloseCurrentConnections() {
void SetCacheMode(bool enabled) {
}
+void ClearCache() {
+}
+
std::string GetProductVersion() {
return std::string("DumpRenderTree/0.0.0.0");
}
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index f921a96..14e092a 100644..100755
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -807,6 +807,10 @@ void SetCacheMode(bool enabled) {
// Used in benchmarking, Ignored for test_shell.
}
+void ClearCache() {
+ // Used in benchmarking, Ignored for test_shell.
+}
+
std::string GetProductVersion() {
return std::string("Chrome/0.0.0.0");
}