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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1407163002: Add feature use counting for window.external.AddSearchProvider (Blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: usecounter Created 5 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
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 56619e311285df3bc84cb4858f117d5a55c5e954..2b57065fad135f486f3d50ceff04819f7f3c2b19 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -119,6 +119,7 @@
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
+#include "core/frame/UseCounter.h"
#include "core/html/HTMLAnchorElement.h"
#include "core/html/HTMLCollection.h"
#include "core/html/HTMLFormElement.h"
@@ -1640,6 +1641,20 @@ WebString WebLocalFrameImpl::layerTreeAsText(bool showDebugInfo) const
return WebString(frame()->layerTreeAsText(showDebugInfo ? LayerTreeIncludesDebugInfo : LayerTreeNormal));
}
+void WebLocalFrameImpl::countFeatureUse(WebFrame::Feature feature)
+{
+ UseCounter::Feature internalFeature = UseCounter::NumberOfFeatures;
+ switch (feature) {
+ case ExternalAddSearchProvider:
+ internalFeature = UseCounter::ExternalAddSearchProvider;
+ break;
+ case ExternalIsSearchProviderInstalled:
+ internalFeature = UseCounter::ExternalIsSearchProviderInstalled;
+ break;
+ }
+ UseCounter::count(frame(), internalFeature);
+}
+
// WebLocalFrameImpl public ---------------------------------------------------------
WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* client)

Powered by Google App Engine
This is Rietveld 408576698