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

Unified Diff: Source/core/frame/UseCounter.h

Issue 656693002: Don't count UseCounters in private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/UseCounter.h
diff --git a/Source/core/frame/UseCounter.h b/Source/core/frame/UseCounter.h
index 6829f7ee57db49860bda347a278b03cd47959013..c20a5100d5226004fbbeeaadd4f7227859a2fc4e 100644
--- a/Source/core/frame/UseCounter.h
+++ b/Source/core/frame/UseCounter.h
@@ -32,6 +32,7 @@
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/text/WTFString.h"
+#include <v8.h>
namespace blink {
@@ -547,6 +548,12 @@ public:
// This doesn't count for ExecutionContexts for shared workers and service
// workers.
static void count(const ExecutionContext*, Feature);
+ // Use countIfNotPrivateScript() instead of count() if you don't want
+ // to count metrics in private scripts. You should use
+ // countIfNotPrivateScript() in a binding layer.
+ static void countIfNotPrivateScript(v8::Isolate*, const Document&, Feature);
+ static void countIfNotPrivateScript(v8::Isolate*, const ExecutionContext*, Feature);
+
void count(CSSParserContext, CSSPropertyID);
void count(Feature);
@@ -562,6 +569,10 @@ public:
static void countDeprecation(const LocalDOMWindow*, Feature);
static void countDeprecation(ExecutionContext*, Feature);
static void countDeprecation(const Document&, Feature);
+ // Use countDeprecationIfNotPrivateScript() instead of countDeprecation()
+ // if you don't want to count metrics in private scripts. You should use
+ // countDeprecationIfNotPrivateScript() in a binding layer.
+ static void countDeprecationIfNotPrivateScript(v8::Isolate*, ExecutionContext*, Feature);
String deprecationMessage(Feature);
void didCommitLoad();
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698