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 ba13327cba9f5968928a0002b65e4e8e51592f41..ea3adfb958fa149ae8ccd3e47608db79c46682a5 100644 |
--- a/content/browser/service_worker/service_worker_version.h |
+++ b/content/browser/service_worker/service_worker_version.h |
@@ -286,6 +286,9 @@ class CONTENT_EXPORT ServiceWorkerVersion |
void ReportError(ServiceWorkerStatusCode status, |
const std::string& status_message); |
+ // Sets the status code to pass to StartWorker callbacks if start fails. |
+ void SetStartWorkerStatusCode(ServiceWorkerStatusCode status); |
+ |
// Sets this version's status to REDUNDANT and deletes its resources. |
// The version must not have controllees. |
void Doom(); |
@@ -543,6 +546,12 @@ class CONTENT_EXPORT ServiceWorkerVersion |
std::vector<int> pending_skip_waiting_requests_; |
scoped_ptr<net::HttpResponseInfo> main_script_http_info_; |
+ // The status when StartWorker was invoked. Used for UMA. |
+ Status prestart_status_ = NEW; |
nhiroki
2015/04/24 04:58:28
How about binding "prestart status" to DidEnsureLi
falken
2015/04/24 05:08:26
I originally wanted to do this but there are Recor
nhiroki
2015/04/24 05:23:57
Oh... I see. Thank you for explanation. LGTM
|
+ // If not OK, the reason that StartWorker failed. Used for |
+ // running |start_callbacks_|. |
+ ServiceWorkerStatusCode start_worker_status_ = SERVICE_WORKER_OK; |
+ |
base::WeakPtrFactory<ServiceWorkerVersion> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerVersion); |