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

Side by Side Diff: content/child/service_worker/web_service_worker_registration_impl.cc

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/child/service_worker/web_service_worker_registration_impl.h" 5 #include "content/child/service_worker/web_service_worker_registration_impl.h"
6 6
7 #include <utility>
8
7 #include "base/macros.h" 9 #include "base/macros.h"
8 #include "content/child/service_worker/service_worker_dispatcher.h" 10 #include "content/child/service_worker/service_worker_dispatcher.h"
9 #include "content/child/service_worker/service_worker_registration_handle_refere nce.h" 11 #include "content/child/service_worker/service_worker_registration_handle_refere nce.h"
10 #include "content/child/service_worker/web_service_worker_impl.h" 12 #include "content/child/service_worker/web_service_worker_impl.h"
11 #include "content/child/service_worker/web_service_worker_provider_impl.h" 13 #include "content/child/service_worker/web_service_worker_provider_impl.h"
12 #include "content/common/service_worker/service_worker_types.h" 14 #include "content/common/service_worker/service_worker_types.h"
13 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerRegistrationProxy.h" 15 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerRegistrationProxy.h"
14 16
15 namespace content { 17 namespace content {
16 18
(...skipping 20 matching lines...) Expand all
37 39
38 WebServiceWorkerRegistrationImpl::QueuedTask::QueuedTask( 40 WebServiceWorkerRegistrationImpl::QueuedTask::QueuedTask(
39 QueuedTaskType type, 41 QueuedTaskType type,
40 const scoped_refptr<WebServiceWorkerImpl>& worker) 42 const scoped_refptr<WebServiceWorkerImpl>& worker)
41 : type(type), worker(worker) {} 43 : type(type), worker(worker) {}
42 44
43 WebServiceWorkerRegistrationImpl::QueuedTask::~QueuedTask() {} 45 WebServiceWorkerRegistrationImpl::QueuedTask::~QueuedTask() {}
44 46
45 WebServiceWorkerRegistrationImpl::WebServiceWorkerRegistrationImpl( 47 WebServiceWorkerRegistrationImpl::WebServiceWorkerRegistrationImpl(
46 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref) 48 scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref)
47 : handle_ref_(handle_ref.Pass()), proxy_(nullptr) { 49 : handle_ref_(std::move(handle_ref)), proxy_(nullptr) {
48 DCHECK(handle_ref_); 50 DCHECK(handle_ref_);
49 DCHECK_NE(kInvalidServiceWorkerRegistrationHandleId, 51 DCHECK_NE(kInvalidServiceWorkerRegistrationHandleId,
50 handle_ref_->handle_id()); 52 handle_ref_->handle_id());
51 ServiceWorkerDispatcher* dispatcher = 53 ServiceWorkerDispatcher* dispatcher =
52 ServiceWorkerDispatcher::GetThreadSpecificInstance(); 54 ServiceWorkerDispatcher::GetThreadSpecificInstance();
53 DCHECK(dispatcher); 55 DCHECK(dispatcher);
54 dispatcher->AddServiceWorkerRegistration(handle_ref_->handle_id(), this); 56 dispatcher->AddServiceWorkerRegistration(handle_ref_->handle_id(), this);
55 } 57 }
56 58
57 void WebServiceWorkerRegistrationImpl::SetInstalling( 59 void WebServiceWorkerRegistrationImpl::SetInstalling(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 163 }
162 164
163 WebServiceWorkerRegistrationImpl::~WebServiceWorkerRegistrationImpl() { 165 WebServiceWorkerRegistrationImpl::~WebServiceWorkerRegistrationImpl() {
164 ServiceWorkerDispatcher* dispatcher = 166 ServiceWorkerDispatcher* dispatcher =
165 ServiceWorkerDispatcher::GetThreadSpecificInstance(); 167 ServiceWorkerDispatcher::GetThreadSpecificInstance();
166 if (dispatcher) 168 if (dispatcher)
167 dispatcher->RemoveServiceWorkerRegistration(handle_ref_->handle_id()); 169 dispatcher->RemoveServiceWorkerRegistration(handle_ref_->handle_id());
168 } 170 }
169 171
170 } // namespace content 172 } // namespace content
OLDNEW
« no previous file with comments | « content/child/service_worker/web_service_worker_impl.cc ('k') | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698