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

Unified Diff: content/browser/service_worker/service_worker_version.cc

Issue 2658603003: ServiceWorker: Enable UseCounter for ServiceWorkerGlobalScope (Closed)
Patch Set: int32_t -> uint32_t 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: content/browser/service_worker/service_worker_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 8f439bbe390e1200de64bf0eb605f0e137ea27f7..b46e47bfd46dde27cb12b2c5bf45949918596224 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -1096,6 +1096,13 @@ ServiceWorkerVersion::GetNavigationPreloadSupportStatus() const {
return NavigationPreloadSupportStatus::NOT_SUPPORTED_FIELD_TRIAL_STOPPED;
}
+void ServiceWorkerVersion::CountFeature(uint32_t feature) {
+ if (!used_features_.insert(feature).second)
+ return;
+ for (auto provider_host_by_uuid : controllee_map_)
+ provider_host_by_uuid.second->CountFeature(feature);
+}
+
void ServiceWorkerVersion::OnSimpleEventResponse(
int request_id,
blink::WebServiceWorkerEventResult result,
« no previous file with comments | « content/browser/service_worker/service_worker_version.h ('k') | content/child/service_worker/service_worker_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698