summaryrefslogtreecommitdiffstats
path: root/webkit/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/extensions')
-rw-r--r--webkit/extensions/v8/benchmarking_extension.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/webkit/extensions/v8/benchmarking_extension.cc b/webkit/extensions/v8/benchmarking_extension.cc
index 600eafa..e622ba7 100644
--- a/webkit/extensions/v8/benchmarking_extension.cc
+++ b/webkit/extensions/v8/benchmarking_extension.cc
@@ -31,6 +31,14 @@ class BenchmarkingWrapper : public v8::Extension {
" native function ClearCache();"
" ClearCache(preserve_ssl_entries);"
"};"
+ "chrome.benchmarking.clearHostResolverCache = function() {"
+ " native function ClearHostResolverCache();"
+ " ClearHostResolverCache();"
+ "};"
+ "chrome.benchmarking.clearPredictorCache = function() {"
+ " native function ClearPredictorCache();"
+ " ClearPredictorCache();"
+ "};"
"chrome.benchmarking.closeConnections = function() {"
" native function CloseConnections();"
" CloseConnections();"
@@ -75,6 +83,10 @@ class BenchmarkingWrapper : public v8::Extension {
return v8::FunctionTemplate::New(CloseConnections);
} else if (name->Equals(v8::String::New("ClearCache"))) {
return v8::FunctionTemplate::New(ClearCache);
+ } else if (name->Equals(v8::String::New("ClearHostResolverCache"))) {
+ return v8::FunctionTemplate::New(ClearHostResolverCache);
+ } else if (name->Equals(v8::String::New("ClearPredictorCache"))) {
+ return v8::FunctionTemplate::New(ClearPredictorCache);
} else if (name->Equals(v8::String::New("EnableSpdy"))) {
return v8::FunctionTemplate::New(EnableSpdy);
} else if (name->Equals(v8::String::New("GetCounter"))) {
@@ -102,6 +114,18 @@ class BenchmarkingWrapper : public v8::Extension {
return v8::Undefined();
}
+ static v8::Handle<v8::Value> ClearHostResolverCache(
+ const v8::Arguments& args) {
+ webkit_glue::ClearHostResolverCache();
+ return v8::Undefined();
+ }
+
+ static v8::Handle<v8::Value> ClearPredictorCache(
+ const v8::Arguments& args) {
+ webkit_glue::ClearPredictorCache();
+ return v8::Undefined();
+ }
+
static v8::Handle<v8::Value> EnableSpdy(const v8::Arguments& args) {
if (!args.Length() || !args[0]->IsBoolean())
return v8::Undefined();