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

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

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: simplify Created 3 years, 10 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/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index 7c2cecea6df0ac8b16342a0e92b9933b2b898746..04764e4f21eabb11fce26ed234387d0050fec89a 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -222,16 +222,18 @@ WebSharedWorkerImpl::createClientMessageLoop() {
// WorkerReportingProxy --------------------------------------------------------
-void WebSharedWorkerImpl::countFeature(UseCounter::Feature) {
- // TODO(nhiroki): Support UseCounter for SharedWorker. Send an IPC message to
- // the browser process and ask each connected document to record API use in
- // its UseCounter (https://crbug.com/376039).
+void WebSharedWorkerImpl::countFeature(UseCounter::Feature feature) {
+ m_parentFrameTaskRunners->get(TaskType::UnspecedTimer)
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(&WebSharedWorkerClient::countFeature,
+ crossThreadUnretained(m_client), feature));
}
-void WebSharedWorkerImpl::countDeprecation(UseCounter::Feature) {
- // TODO(nhiroki): Support UseCounter for SharedWorker. Send an IPC message to
- // the browser process and ask each connected document to record API use in
- // its UseCounter (https://crbug.com/376039).
+void WebSharedWorkerImpl::countDeprecation(UseCounter::Feature feature) {
+ // Go through the same code path with countFeature() because a deprecation
+ // message is already shown on the worker console and a remaining work is just
+ // to record an API use.
+ countFeature(feature);
}
void WebSharedWorkerImpl::reportException(const String& errorMessage,

Powered by Google App Engine
This is Rietveld 408576698