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

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

Issue 2052613003: Speculatively launch Service Workers on mouse/touch events. [3/5] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary includes Created 4 years, 5 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_metrics.cc
diff --git a/content/browser/service_worker/service_worker_metrics.cc b/content/browser/service_worker/service_worker_metrics.cc
index 07585564f47f1ef4c7e1859b4b4db11ddaa5cd13..0c1cfca0951b5642261ca5dac6621c4b368e8a3d 100644
--- a/content/browser/service_worker/service_worker_metrics.cc
+++ b/content/browser/service_worker/service_worker_metrics.cc
@@ -71,6 +71,12 @@ std::string EventTypeToSuffix(ServiceWorkerMetrics::EventType event_type) {
return "_FETCH_WAITUNTIL";
case ServiceWorkerMetrics::EventType::FOREIGN_FETCH_WAITUNTIL:
return "_FOREIGN_FETCH_WAITUNTIL";
+ case ServiceWorkerMetrics::EventType::NAVIGATION_HINT_LINK_MOUSE_DOWN:
+ return "_NAVIGATION_HINT_LINK_MOUSE_DOWN";
+ case ServiceWorkerMetrics::EventType::NAVIGATION_HINT_LINK_TAP_UNCONFIRMED:
+ return "_NAVIGATION_HINT_LINK_TAP_UNCONFIRMED";
+ case ServiceWorkerMetrics::EventType::NAVIGATION_HINT_LINK_TAP_DOWN:
+ return "_NAVIGATION_HINT_LINK_TAP_DOWN";
case ServiceWorkerMetrics::EventType::NUM_TYPES:
NOTREACHED() << static_cast<int>(event_type);
}
@@ -194,6 +200,12 @@ const char* ServiceWorkerMetrics::EventTypeToString(EventType event_type) {
return "Fetch WaitUntil";
case EventType::FOREIGN_FETCH_WAITUNTIL:
return "Foreign Fetch WaitUntil";
+ case EventType::NAVIGATION_HINT_LINK_MOUSE_DOWN:
+ return "Navigation Hint Link Mouse Down";
+ case EventType::NAVIGATION_HINT_LINK_TAP_UNCONFIRMED:
+ return "Navigation Hint Link Tap Unconfirmed";
+ case EventType::NAVIGATION_HINT_LINK_TAP_DOWN:
+ return "Navigation Hint Link Tap Down";
case EventType::NUM_TYPES:
break;
}
@@ -461,6 +473,10 @@ void ServiceWorkerMetrics::RecordEventDuration(EventType event,
UMA_HISTOGRAM_MEDIUM_TIMES("ServiceWorker.ExtendableMessageEvent.Time",
time);
break;
+ // Those navigation hints should not be sent as request events.
+ case EventType::NAVIGATION_HINT_LINK_MOUSE_DOWN:
+ case EventType::NAVIGATION_HINT_LINK_TAP_UNCONFIRMED:
+ case EventType::NAVIGATION_HINT_LINK_TAP_DOWN:
case EventType::UNKNOWN:
case EventType::NUM_TYPES:
« no previous file with comments | « content/browser/service_worker/service_worker_metrics.h ('k') | content/public/browser/service_worker_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698