Chromium Code Reviews| Index: content/browser/service_worker/service_worker_version.h |
| diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h |
| index f8f95eff88a97be3d681e9a1bebfb4d35c49b5d9..1c3e2753fa56e00f8ba09e718e08440b69a5cce2 100644 |
| --- a/content/browser/service_worker/service_worker_version.h |
| +++ b/content/browser/service_worker/service_worker_version.h |
| @@ -466,6 +466,12 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| // for both A and B case. So the methods and attributes are available in JS. |
| NavigationPreloadSupportStatus GetNavigationPreloadSupportStatus() const; |
| + void CountFeature(uint32_t feature); |
| + void set_used_features(std::set<uint32_t> used_features) { |
|
dcheng
2017/02/09 22:43:20
Nit: Pass by const ref
nhiroki
2017/02/13 05:42:09
Done.
|
| + used_features_ = used_features; |
| + } |
| + std::set<uint32_t> used_features() const { return used_features_; } |
|
dcheng
2017/02/09 22:43:20
Consider returning by const ref here as well.
nhiroki
2017/02/13 05:42:09
Done.
|
| + |
| private: |
| friend class base::RefCounted<ServiceWorkerVersion>; |
| friend class ServiceWorkerMetrics; |
| @@ -844,6 +850,11 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| // FinishStartWorker(). |
| base::Optional<ServiceWorkerMetrics::EventType> start_worker_first_purpose_; |
| + // This is the set of features that were used up until installation of this |
| + // version completed, or used during the lifetime of |this|. The values must |
| + // be from blink::UseCounter::Feature enum. |
| + std::set<uint32_t> used_features_; |
| + |
| base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |