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

Side by Side Diff: content/common/service_worker/service_worker_status_code.h

Issue 962543005: Service Worker: Add metrics and timeout for starting a Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_ 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_
6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_ 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // Generic service worker operation statuses. 12 // Generic service worker operation statuses.
13 // This enum is used in UMA histograms, so don't change the order or remove
14 // entries.
13 enum ServiceWorkerStatusCode { 15 enum ServiceWorkerStatusCode {
14 // Operation succeeded. 16 // Operation succeeded.
15 SERVICE_WORKER_OK, 17 SERVICE_WORKER_OK,
16 18
17 // Generic operation error (more specific error code should be used in 19 // Generic operation error (more specific error code should be used in
18 // general). 20 // general).
19 SERVICE_WORKER_ERROR_FAILED, 21 SERVICE_WORKER_ERROR_FAILED,
20 22
21 // Operation was aborted (e.g. due to context or child process shutdown). 23 // Operation was aborted (e.g. due to context or child process shutdown).
22 SERVICE_WORKER_ERROR_ABORT, 24 SERVICE_WORKER_ERROR_ABORT,
(...skipping 24 matching lines...) Expand all
47 SERVICE_WORKER_ERROR_NETWORK, 49 SERVICE_WORKER_ERROR_NETWORK,
48 50
49 // Operation is failed by security issue. 51 // Operation is failed by security issue.
50 SERVICE_WORKER_ERROR_SECURITY, 52 SERVICE_WORKER_ERROR_SECURITY,
51 53
52 // Event handling failed (event.waitUntil Promise rejected). 54 // Event handling failed (event.waitUntil Promise rejected).
53 SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED, 55 SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED,
54 56
55 // An error triggered by invalid worker state. 57 // An error triggered by invalid worker state.
56 SERVICE_WORKER_ERROR_STATE, 58 SERVICE_WORKER_ERROR_STATE,
59
60 // The Service Worker took too long to finish a task.
61 SERVICE_WORKER_ERROR_TIMEOUT,
62
63 SERVICE_WORKER_ERROR_MAX_VALUE
57 }; 64 };
58 65
59 CONTENT_EXPORT const char* ServiceWorkerStatusToString( 66 CONTENT_EXPORT const char* ServiceWorkerStatusToString(
60 ServiceWorkerStatusCode code); 67 ServiceWorkerStatusCode code);
61 68
62 } // namespace content 69 } // namespace content
63 70
64 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_ 71 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698