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

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

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: tweak 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/SharedWorkerRepositoryClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp
index dd43f21e7c08ebb54618f63d4adb24b6bc48f2b4..85b817583029fa0db13606cd930ad0bc3e6eb9c3 100644
--- a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp
+++ b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp
@@ -32,6 +32,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/events/Event.h"
+#include "core/frame/Deprecation.h"
#include "core/frame/UseCounter.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/inspector/InspectorInstrumentation.h"
@@ -96,6 +97,15 @@ class SharedWorkerConnectListener final
void connected() override { m_worker->setIsBeingConnected(false); }
+ void countFeature(uint32_t useCounterId) override {
+ UseCounter::Feature feature =
+ static_cast<UseCounter::Feature>(useCounterId);
+ if (Deprecation::deprecationMessage(feature).isEmpty())
+ UseCounter::count(m_worker->getExecutionContext(), feature);
+ else
+ Deprecation::countDeprecation(m_worker->getExecutionContext(), feature);
+ }
+
Persistent<SharedWorker> m_worker;
};

Powered by Google App Engine
This is Rietveld 408576698