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

Side by Side Diff: content/browser/service_worker/service_worker_version.h

Issue 1133853007: Add UMA to record the ratio of how many fetch events are not handled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comment Created 5 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 ActivateWaitingVersion); 322 ActivateWaitingVersion);
323 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, IdleTimeout); 323 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, IdleTimeout);
324 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, SetDevToolsAttached); 324 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, SetDevToolsAttached);
325 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWaitForeverInFetchTest, RequestTimeout); 325 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerWaitForeverInFetchTest, RequestTimeout);
326 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerFailToStartTest, Timeout); 326 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerFailToStartTest, Timeout);
327 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionBrowserTest, 327 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionBrowserTest,
328 TimeoutStartingWorker); 328 TimeoutStartingWorker);
329 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionBrowserTest, 329 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionBrowserTest,
330 TimeoutWorkerInEvent); 330 TimeoutWorkerInEvent);
331 331
332 class ServiceWorkerEventMetrics;
333
332 typedef ServiceWorkerVersion self; 334 typedef ServiceWorkerVersion self;
333 using ServiceWorkerClients = std::vector<ServiceWorkerClientInfo>; 335 using ServiceWorkerClients = std::vector<ServiceWorkerClientInfo>;
334 336
335 enum RequestType { 337 enum RequestType {
336 REQUEST_ACTIVATE, 338 REQUEST_ACTIVATE,
337 REQUEST_INSTALL, 339 REQUEST_INSTALL,
338 REQUEST_FETCH, 340 REQUEST_FETCH,
339 REQUEST_SYNC, 341 REQUEST_SYNC,
340 REQUEST_NOTIFICATION_CLICK, 342 REQUEST_NOTIFICATION_CLICK,
341 REQUEST_PUSH, 343 REQUEST_PUSH,
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 548
547 std::vector<int> pending_skip_waiting_requests_; 549 std::vector<int> pending_skip_waiting_requests_;
548 scoped_ptr<net::HttpResponseInfo> main_script_http_info_; 550 scoped_ptr<net::HttpResponseInfo> main_script_http_info_;
549 551
550 // The status when StartWorker was invoked. Used for UMA. 552 // The status when StartWorker was invoked. Used for UMA.
551 Status prestart_status_ = NEW; 553 Status prestart_status_ = NEW;
552 // If not OK, the reason that StartWorker failed. Used for 554 // If not OK, the reason that StartWorker failed. Used for
553 // running |start_callbacks_|. 555 // running |start_callbacks_|.
554 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK; 556 ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK;
555 557
558 scoped_ptr<ServiceWorkerEventMetrics> metrics_;
559
556 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; 560 base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_;
557 561
558 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); 562 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion);
559 }; 563 };
560 564
561 } // namespace content 565 } // namespace content
562 566
563 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ 567 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_metrics.cc ('k') | content/browser/service_worker/service_worker_version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698