Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(957)

Unified Diff: webkit/extensions/v8/benchmarking_extension.cc

Issue 2819037: Show a warning message if the cache might not be cleared between runs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/extensions/v8/benchmarking_extension.cc
diff --git a/webkit/extensions/v8/benchmarking_extension.cc b/webkit/extensions/v8/benchmarking_extension.cc
index 362a928e9c0dfe11d1aabbda852e264591c40643..5790ee40c5e9ebe7fb20118b855e0c7b0b36f0f7 100644
--- a/webkit/extensions/v8/benchmarking_extension.cc
+++ b/webkit/extensions/v8/benchmarking_extension.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
#include "base/stats_table.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#include "webkit/extensions/v8/benchmarking_extension.h"
@@ -35,6 +36,10 @@ class BenchmarkingWrapper : public v8::Extension {
" native function GetCounter();"
" return GetCounter(name);"
"};"
+ "chrome.benchmarking.isSingleProcess = function() {"
+ " native function IsSingleProcess();"
+ " return IsSingleProcess();"
+ "};"
) {}
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
@@ -45,6 +50,8 @@ class BenchmarkingWrapper : public v8::Extension {
return v8::FunctionTemplate::New(ClearCache);
} else if (name->Equals(v8::String::New("GetCounter"))) {
return v8::FunctionTemplate::New(GetCounter);
+ } else if (name->Equals(v8::String::New("IsSingleProcess"))) {
+ return v8::FunctionTemplate::New(IsSingleProcess);
}
return v8::Handle<v8::FunctionTemplate>();
}
@@ -73,6 +80,10 @@ class BenchmarkingWrapper : public v8::Extension {
int counter = StatsTable::current()->GetCounterValue(name);
return v8::Integer::New(counter);
}
+
+ static v8::Handle<v8::Value> IsSingleProcess(const v8::Arguments& args) {
+ return v8::Boolean::New(webkit_glue::IsSingleProcess());
+ }
};
v8::Extension* BenchmarkingExtension::Get() {
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698