summaryrefslogtreecommitdiffstats
path: root/webkit/extensions
diff options
context:
space:
mode:
authormbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 23:14:44 +0000
committermbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 23:14:44 +0000
commit0e34852ad6c4d5bc35f7000392467837211c9a87 (patch)
tree7b04317a795dbb0aae584699ad4f4a81d2ee7b3b /webkit/extensions
parentaa042406ccff58edb414117877b669b5ca2d7a32 (diff)
downloadchromium_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 'webkit/extensions')
-rw-r--r--webkit/extensions/v8/benchmarking_extension.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/webkit/extensions/v8/benchmarking_extension.cc b/webkit/extensions/v8/benchmarking_extension.cc
index 2fa56eb0..600eafa 100644
--- a/webkit/extensions/v8/benchmarking_extension.cc
+++ b/webkit/extensions/v8/benchmarking_extension.cc
@@ -27,9 +27,9 @@ class BenchmarkingWrapper : public v8::Extension {
"if (typeof(chrome.benchmarking) == 'undefined') {"
" chrome.benchmarking = {};"
"};"
- "chrome.benchmarking.clearCache = function() {"
+ "chrome.benchmarking.clearCache = function(preserve_ssl_entries) {"
" native function ClearCache();"
- " ClearCache();"
+ " ClearCache(preserve_ssl_entries);"
"};"
"chrome.benchmarking.closeConnections = function() {"
" native function CloseConnections();"
@@ -94,7 +94,10 @@ class BenchmarkingWrapper : public v8::Extension {
}
static v8::Handle<v8::Value> ClearCache(const v8::Arguments& args) {
- webkit_glue::ClearCache();
+ bool preserve_ssl_host_entries = false;
+ if (args.Length() && args[0]->IsBoolean())
+ preserve_ssl_host_entries = args[0]->BooleanValue();
+ webkit_glue::ClearCache(preserve_ssl_host_entries);
WebCache::clear();
return v8::Undefined();
}