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

Side by Side Diff: content/browser/service_worker/service_worker_handle.cc

Issue 508433002: Remove implicit conversions from scoped_refptr to T* in content/browser/service_worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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 "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_registration.h" 8 #include "content/browser/service_worker/service_worker_registration.h"
9 #include "content/common/service_worker/service_worker_messages.h" 9 #include "content/common/service_worker/service_worker_messages.h"
10 #include "ipc/ipc_sender.h" 10 #include "ipc/ipc_sender.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void ServiceWorkerHandle::OnVersionStateChanged(ServiceWorkerVersion* version) { 104 void ServiceWorkerHandle::OnVersionStateChanged(ServiceWorkerVersion* version) {
105 sender_->Send(new ServiceWorkerMsg_ServiceWorkerStateChanged( 105 sender_->Send(new ServiceWorkerMsg_ServiceWorkerStateChanged(
106 thread_id_, handle_id_, GetWebServiceWorkerState(version))); 106 thread_id_, handle_id_, GetWebServiceWorkerState(version)));
107 } 107 }
108 108
109 ServiceWorkerObjectInfo ServiceWorkerHandle::GetObjectInfo() { 109 ServiceWorkerObjectInfo ServiceWorkerHandle::GetObjectInfo() {
110 ServiceWorkerObjectInfo info; 110 ServiceWorkerObjectInfo info;
111 info.handle_id = handle_id_; 111 info.handle_id = handle_id_;
112 info.scope = registration_->pattern(); 112 info.scope = registration_->pattern();
113 info.url = registration_->script_url(); 113 info.url = registration_->script_url();
114 info.state = GetWebServiceWorkerState(version_); 114 info.state = GetWebServiceWorkerState(version_.get());
115 return info; 115 return info;
116 } 116 }
117 117
118 void ServiceWorkerHandle::IncrementRefCount() { 118 void ServiceWorkerHandle::IncrementRefCount() {
119 DCHECK_GT(ref_count_, 0); 119 DCHECK_GT(ref_count_, 0);
120 ++ref_count_; 120 ++ref_count_;
121 } 121 }
122 122
123 void ServiceWorkerHandle::DecrementRefCount() { 123 void ServiceWorkerHandle::DecrementRefCount() {
124 DCHECK_GE(ref_count_, 0); 124 DCHECK_GE(ref_count_, 0);
125 --ref_count_; 125 --ref_count_;
126 } 126 }
127 127
128 } // namespace content 128 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698