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

Side by Side Diff: third_party/WebKit/Source/core/testing/WorkerInternals.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/testing/WorkerInternals.h" 5 #include "core/testing/WorkerInternals.h"
6 6
7 #include "bindings/core/v8/ScriptState.h"
8 #include "core/frame/Deprecation.h"
9 #include "core/frame/UseCounter.h"
7 #include "core/testing/OriginTrialsTest.h" 10 #include "core/testing/OriginTrialsTest.h"
8 11
9 namespace blink { 12 namespace blink {
10 13
11 WorkerInternals::~WorkerInternals() {} 14 WorkerInternals::~WorkerInternals() {}
12 15
13 WorkerInternals::WorkerInternals() {} 16 WorkerInternals::WorkerInternals() {}
14 17
15 OriginTrialsTest* WorkerInternals::originTrialsTest() const { 18 OriginTrialsTest* WorkerInternals::originTrialsTest() const {
16 return OriginTrialsTest::create(); 19 return OriginTrialsTest::create();
17 } 20 }
18 21
22 void WorkerInternals::countFeature(ScriptState* scriptState,
23 uint32_t useCounterId) {
24 UseCounter::count(scriptState->getExecutionContext(),
25 static_cast<UseCounter::Feature>(useCounterId));
26 }
27
28 void WorkerInternals::countDeprecation(ScriptState* scriptState,
29 uint32_t useCounterId) {
30 Deprecation::countDeprecation(scriptState->getExecutionContext(),
31 static_cast<UseCounter::Feature>(useCounterId));
32 }
33
19 } // namespace blink 34 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698