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

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

Issue 1460653002: ServiceWorker: Fix messed registration attributes on ServiceWorkerGlobalScope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/registration-attribute.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/service_worker_provider_context.h" 5 #include "content/child/service_worker/service_worker_provider_context.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "content/child/child_thread_impl.h" 8 #include "content/child/child_thread_impl.h"
9 #include "content/child/service_worker/service_worker_dispatcher.h" 9 #include "content/child/service_worker/service_worker_dispatcher.h"
10 #include "content/child/service_worker/service_worker_handle_reference.h" 10 #include "content/child/service_worker/service_worker_handle_reference.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 ControllerDelegate() {} 85 ControllerDelegate() {}
86 ~ControllerDelegate() override {} 86 ~ControllerDelegate() override {}
87 87
88 void AssociateRegistration( 88 void AssociateRegistration(
89 scoped_ptr<ServiceWorkerRegistrationHandleReference> registration, 89 scoped_ptr<ServiceWorkerRegistrationHandleReference> registration,
90 scoped_ptr<ServiceWorkerHandleReference> installing, 90 scoped_ptr<ServiceWorkerHandleReference> installing,
91 scoped_ptr<ServiceWorkerHandleReference> waiting, 91 scoped_ptr<ServiceWorkerHandleReference> waiting,
92 scoped_ptr<ServiceWorkerHandleReference> active) override { 92 scoped_ptr<ServiceWorkerHandleReference> active) override {
93 DCHECK(!registration_); 93 DCHECK(!registration_);
94 registration_ = registration.Pass(); 94 registration_ = registration.Pass();
95 installing_ = active.Pass(); 95 installing_ = installing.Pass();
96 waiting_ = waiting.Pass(); 96 waiting_ = waiting.Pass();
97 active_ = active.Pass(); 97 active_ = active.Pass();
98 } 98 }
99 99
100 void DisassociateRegistration() override { 100 void DisassociateRegistration() override {
101 // ServiceWorkerGlobalScope is never disassociated. 101 // ServiceWorkerGlobalScope is never disassociated.
102 NOTREACHED(); 102 NOTREACHED();
103 } 103 }
104 104
105 void SetController( 105 void SetController(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 void ServiceWorkerProviderContext::DestructOnMainThread() const { 203 void ServiceWorkerProviderContext::DestructOnMainThread() const {
204 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() && 204 if (!main_thread_task_runner_->RunsTasksOnCurrentThread() &&
205 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) { 205 main_thread_task_runner_->DeleteSoon(FROM_HERE, this)) {
206 return; 206 return;
207 } 207 }
208 delete this; 208 delete this;
209 } 209 }
210 210
211 } // namespace content 211 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/registration-attribute.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698