OLD | NEW |
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 #include "content/browser/service_worker/service_worker_handle.h" | 5 #include "content/browser/service_worker/service_worker_handle.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "content/browser/service_worker/service_worker_context_core.h" | 8 #include "content/browser/service_worker/service_worker_context_core.h" |
9 #include "content/browser/service_worker/service_worker_registration.h" | 9 #include "content/browser/service_worker/service_worker_registration.h" |
10 #include "content/common/service_worker/service_worker_messages.h" | 10 #include "content/common/service_worker/service_worker_messages.h" |
11 #include "content/common/service_worker/service_worker_types.h" | 11 #include "content/common/service_worker/service_worker_types.h" |
| 12 #include "content/public/common/service_worker_modes.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 namespace { | 16 namespace { |
16 | 17 |
17 blink::WebServiceWorkerState | 18 blink::WebServiceWorkerState |
18 GetWebServiceWorkerState(ServiceWorkerVersion* version) { | 19 GetWebServiceWorkerState(ServiceWorkerVersion* version) { |
19 DCHECK(version); | 20 DCHECK(version); |
20 switch (version->status()) { | 21 switch (version->status()) { |
21 case ServiceWorkerVersion::NEW: | 22 case ServiceWorkerVersion::NEW: |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 DCHECK_GT(ref_count_, 0); | 87 DCHECK_GT(ref_count_, 0); |
87 ++ref_count_; | 88 ++ref_count_; |
88 } | 89 } |
89 | 90 |
90 void ServiceWorkerHandle::DecrementRefCount() { | 91 void ServiceWorkerHandle::DecrementRefCount() { |
91 DCHECK_GE(ref_count_, 0); | 92 DCHECK_GE(ref_count_, 0); |
92 --ref_count_; | 93 --ref_count_; |
93 } | 94 } |
94 | 95 |
95 } // namespace content | 96 } // namespace content |
OLD | NEW |