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

Unified Diff: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp

Issue 2234723002: Added UseCounter for navigator.share (WebShareShare). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
index 6e4bba14596b7147ffc6f9577a0694a049f2814a..306231a7fdb4068a1cbe3cfc5f2bd5a79e7f6994 100644
--- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
+++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
@@ -9,6 +9,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Navigator.h"
+#include "core/frame/UseCounter.h"
#include "modules/webshare/ShareData.h"
#include "platform/mojo/MojoHelper.h"
#include "public/platform/InterfaceProvider.h"
@@ -81,9 +82,11 @@ const char* NavigatorShare::supplementName()
ScriptPromise NavigatorShare::share(ScriptState* scriptState, const ShareData& shareData)
{
+ Document* doc = toDocument(scriptState->getExecutionContext());
+ DCHECK(doc);
+ UseCounter::count(doc, UseCounter::WebShareShare);
esprehn 2016/08/10 17:58:58 You're actually calling the ExecutionContext versi
Matt Giuca 2016/08/11 03:33:17 D'oh. That's pretty confusing (I was deliberately
+
if (!m_service) {
- Document* doc = toDocument(scriptState->getExecutionContext());
- DCHECK(doc);
LocalFrame* frame = doc->frame();
DCHECK(frame);
frame->interfaceProvider()->getInterface(mojo::GetProxy(&m_service));
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698