Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <functional> | 10 #include <functional> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 // Starts an embedded worker for this version. | 165 // Starts an embedded worker for this version. |
| 166 // This returns OK (success) if the worker is already running. | 166 // This returns OK (success) if the worker is already running. |
| 167 // |purpose| is recorded in UMA. | 167 // |purpose| is recorded in UMA. |
| 168 void StartWorker(ServiceWorkerMetrics::EventType purpose, | 168 void StartWorker(ServiceWorkerMetrics::EventType purpose, |
| 169 const StatusCallback& callback); | 169 const StatusCallback& callback); |
| 170 | 170 |
| 171 // Stops an embedded worker for this version. | 171 // Stops an embedded worker for this version. |
| 172 // This returns OK (success) if the worker is already stopped. | 172 // This returns OK (success) if the worker is already stopped. |
| 173 void StopWorker(const StatusCallback& callback); | 173 void StopWorker(const StatusCallback& callback); |
| 174 | 174 |
| 175 // Skips waiting and forces this version to become activated. | |
|
caseq
2016/05/05 01:09:21
s/forces/force/
| |
| 176 void SkipWaitingFromDevTools(); | |
| 177 | |
| 175 // Schedules an update to be run 'soon'. | 178 // Schedules an update to be run 'soon'. |
| 176 void ScheduleUpdate(); | 179 void ScheduleUpdate(); |
| 177 | 180 |
| 178 // If an update is scheduled but not yet started, this resets the timer | 181 // If an update is scheduled but not yet started, this resets the timer |
| 179 // delaying the start time by a 'small' amount. | 182 // delaying the start time by a 'small' amount. |
| 180 void DeferScheduledUpdate(); | 183 void DeferScheduledUpdate(); |
| 181 | 184 |
| 182 // Starts an update now. | 185 // Starts an update now. |
| 183 void StartUpdate(); | 186 void StartUpdate(); |
| 184 | 187 |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 750 | 753 |
| 751 // At this point |this| can have been deleted, so don't do anything other | 754 // At this point |this| can have been deleted, so don't do anything other |
| 752 // than returning. | 755 // than returning. |
| 753 | 756 |
| 754 return true; | 757 return true; |
| 755 } | 758 } |
| 756 | 759 |
| 757 } // namespace content | 760 } // namespace content |
| 758 | 761 |
| 759 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ | 762 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_VERSION_H_ |
| OLD | NEW |