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

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

Issue 380093002: Update installed ServiceWorkers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_provider_host.h" 5 #include "content/browser/service_worker/service_worker_provider_host.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/browser/message_port_message_filter.h" 8 #include "content/browser/message_port_message_filter.h"
9 #include "content/browser/service_worker/service_worker_context_core.h" 9 #include "content/browser/service_worker/service_worker_context_core.h"
10 #include "content/browser/service_worker/service_worker_context_request_handler. h" 10 #include "content/browser/service_worker/service_worker_context_request_handler. h"
(...skipping 12 matching lines...) Expand all
23 int process_id, int provider_id, 23 int process_id, int provider_id,
24 base::WeakPtr<ServiceWorkerContextCore> context, 24 base::WeakPtr<ServiceWorkerContextCore> context,
25 ServiceWorkerDispatcherHost* dispatcher_host) 25 ServiceWorkerDispatcherHost* dispatcher_host)
26 : process_id_(process_id), 26 : process_id_(process_id),
27 provider_id_(provider_id), 27 provider_id_(provider_id),
28 context_(context), 28 context_(context),
29 dispatcher_host_(dispatcher_host) { 29 dispatcher_host_(dispatcher_host) {
30 } 30 }
31 31
32 ServiceWorkerProviderHost::~ServiceWorkerProviderHost() { 32 ServiceWorkerProviderHost::~ServiceWorkerProviderHost() {
33 // Clear docurl so the deferred activation of a waiting worker
34 // won't associate the new version with a provider being destroyed.
35 document_url_ = GURL();
33 if (controlling_version_) 36 if (controlling_version_)
34 controlling_version_->RemoveControllee(this); 37 controlling_version_->RemoveControllee(this);
35 if (active_version_) 38 if (active_version_)
36 active_version_->RemovePotentialControllee(this); 39 active_version_->RemovePotentialControllee(this);
37 if (waiting_version_) 40 if (waiting_version_)
38 waiting_version_->RemovePotentialControllee(this); 41 waiting_version_->RemovePotentialControllee(this);
39 if (installing_version_) 42 if (installing_version_)
40 installing_version_->RemovePotentialControllee(this); 43 installing_version_->RemovePotentialControllee(this);
41 } 44 }
42 45
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass()); 231 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass());
229 } 232 }
230 return info; 233 return info;
231 } 234 }
232 235
233 bool ServiceWorkerProviderHost::IsContextAlive() { 236 bool ServiceWorkerProviderHost::IsContextAlive() {
234 return context_ != NULL; 237 return context_ != NULL;
235 } 238 }
236 239
237 } // namespace content 240 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698