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

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

Issue 2218943002: Introduce ServiceWorker.EventDispatchingDelay UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated mpearson@'s comment Created 4 years, 3 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_REGISTER_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/time/time.h"
13 #include "content/browser/service_worker/embedded_worker_instance.h" 14 #include "content/browser/service_worker/embedded_worker_instance.h"
14 #include "content/browser/service_worker/service_worker_register_job_base.h" 15 #include "content/browser/service_worker/service_worker_register_job_base.h"
15 #include "content/browser/service_worker/service_worker_registration.h" 16 #include "content/browser/service_worker/service_worker_registration.h"
16 #include "content/common/service_worker/service_worker_status_code.h" 17 #include "content/common/service_worker/service_worker_status_code.h"
17 #include "url/gurl.h" 18 #include "url/gurl.h"
18 19
19 namespace content { 20 namespace content {
20 21
21 class ServiceWorkerJobCoordinator; 22 class ServiceWorkerJobCoordinator;
22 class ServiceWorkerStorage; 23 class ServiceWorkerStorage;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void ContinueWithRegistrationForSameScriptUrl( 118 void ContinueWithRegistrationForSameScriptUrl(
118 scoped_refptr<ServiceWorkerRegistration> existing_registration, 119 scoped_refptr<ServiceWorkerRegistration> existing_registration,
119 ServiceWorkerStatusCode status); 120 ServiceWorkerStatusCode status);
120 void UpdateAndContinue(); 121 void UpdateAndContinue();
121 void OnStartWorkerFinished(ServiceWorkerStatusCode status); 122 void OnStartWorkerFinished(ServiceWorkerStatusCode status);
122 void OnStoreRegistrationComplete(ServiceWorkerStatusCode status); 123 void OnStoreRegistrationComplete(ServiceWorkerStatusCode status);
123 void InstallAndContinue(); 124 void InstallAndContinue();
124 void DispatchInstallEvent(); 125 void DispatchInstallEvent();
125 void OnInstallFinished(int request_id, 126 void OnInstallFinished(int request_id,
126 blink::WebServiceWorkerEventResult result, 127 blink::WebServiceWorkerEventResult result,
127 bool has_fetch_handler); 128 bool has_fetch_handler,
129 base::Time dispatch_event_time);
128 void OnInstallFailed(ServiceWorkerStatusCode status); 130 void OnInstallFailed(ServiceWorkerStatusCode status);
129 void Complete(ServiceWorkerStatusCode status); 131 void Complete(ServiceWorkerStatusCode status);
130 void Complete(ServiceWorkerStatusCode status, 132 void Complete(ServiceWorkerStatusCode status,
131 const std::string& status_message); 133 const std::string& status_message);
132 void CompleteInternal(ServiceWorkerStatusCode status, 134 void CompleteInternal(ServiceWorkerStatusCode status,
133 const std::string& status_message); 135 const std::string& status_message);
134 void ResolvePromise(ServiceWorkerStatusCode status, 136 void ResolvePromise(ServiceWorkerStatusCode status,
135 const std::string& status_message, 137 const std::string& status_message,
136 ServiceWorkerRegistration* registration); 138 ServiceWorkerRegistration* registration);
137 139
(...skipping 23 matching lines...) Expand all
161 std::string promise_resolved_status_message_; 163 std::string promise_resolved_status_message_;
162 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_; 164 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_;
163 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; 165 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_;
164 166
165 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); 167 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob);
166 }; 168 };
167 169
168 } // namespace content 170 } // namespace content
169 171
170 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 172 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698