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

Side by Side Diff: content/common/worker_use_counter.h

Issue 2586863002: Worker: Enable UseCounter for SharedWorkerGlobalScope (Closed)
Patch Set: ready to review Created 3 years, 11 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_WORKER_USE_COUNTER_H_
6 #define CONTENT_COMMON_WORKER_USE_COUNTER_H_
7
8 #include <cstdint>
9 #include <memory>
10 #include <vector>
11
12 #include "content/common/content_export.h"
13
14 namespace content {
15
16 // A mirror of UseCounter on WorkerGlobalScope in Blink-side.
17 class CONTENT_EXPORT WorkerUseCounter {
18 public:
19 WorkerUseCounter();
20 explicit WorkerUseCounter(std::vector<char> counter);
21 ~WorkerUseCounter();
22
23 void Count(uint32_t feature);
24 bool IsCounted(uint32_t feature);
25
26 // Returns an internal bit vector that represents a use counter.
27 std::vector<char> Dump();
28
29 size_t GetNumberOfBits() const;
30
31 private:
32 std::vector<char> counter_;
33 };
34
35 } // namespace content
36
37 #endif // CONTENT_COMMON_WORKER_USE_COUNTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698