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_registration_handle.h" | 5 #include "content/browser/service_worker/service_worker_registration_handle.h" |
6 | 6 |
7 #include "content/browser/service_worker/service_worker_context_core.h" | 7 #include "content/browser/service_worker/service_worker_context_core.h" |
8 #include "content/browser/service_worker/service_worker_handle.h" | 8 #include "content/browser/service_worker/service_worker_handle.h" |
9 #include "content/common/service_worker/service_worker_messages.h" | 9 #include "content/common/service_worker/service_worker_messages.h" |
10 #include "content/common/service_worker/service_worker_types.h" | 10 #include "content/common/service_worker/service_worker_types.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 ServiceWorkerRegistrationHandle::~ServiceWorkerRegistrationHandle() { | 42 ServiceWorkerRegistrationHandle::~ServiceWorkerRegistrationHandle() { |
43 DCHECK(registration_.get()); | 43 DCHECK(registration_.get()); |
44 registration_->RemoveListener(this); | 44 registration_->RemoveListener(this); |
45 } | 45 } |
46 | 46 |
47 ServiceWorkerRegistrationObjectInfo | 47 ServiceWorkerRegistrationObjectInfo |
48 ServiceWorkerRegistrationHandle::GetObjectInfo() { | 48 ServiceWorkerRegistrationHandle::GetObjectInfo() { |
49 ServiceWorkerRegistrationObjectInfo info; | 49 ServiceWorkerRegistrationObjectInfo info; |
50 info.handle_id = handle_id_; | 50 info.handle_id = handle_id_; |
51 info.options.scope = registration_->pattern(); | 51 info.options.scope = registration_->pattern(); |
| 52 info.options.update_via_cache = registration_->update_via_cache(); |
| 53 |
52 info.registration_id = registration_->id(); | 54 info.registration_id = registration_->id(); |
53 return info; | 55 return info; |
54 } | 56 } |
55 | 57 |
56 void ServiceWorkerRegistrationHandle::IncrementRefCount() { | 58 void ServiceWorkerRegistrationHandle::IncrementRefCount() { |
57 DCHECK_GT(ref_count_, 0); | 59 DCHECK_GT(ref_count_, 0); |
58 ++ref_count_; | 60 ++ref_count_; |
59 } | 61 } |
60 | 62 |
61 void ServiceWorkerRegistrationHandle::DecrementRefCount() { | 63 void ServiceWorkerRegistrationHandle::DecrementRefCount() { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 if (!provider_host_) | 101 if (!provider_host_) |
100 return; // Could be nullptr in some tests. | 102 return; // Could be nullptr in some tests. |
101 provider_host_->SendSetVersionAttributesMessage(handle_id_, | 103 provider_host_->SendSetVersionAttributesMessage(handle_id_, |
102 changed_mask, | 104 changed_mask, |
103 installing_version, | 105 installing_version, |
104 waiting_version, | 106 waiting_version, |
105 active_version); | 107 active_version); |
106 } | 108 } |
107 | 109 |
108 } // namespace content | 110 } // namespace content |
OLD | NEW |