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

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

Issue 325173002: ServiceWorker: Confirm the liveness of the associated context before handling message (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix more Created 6 years, 6 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (context_ && version) { 166 if (context_ && version) {
167 scoped_ptr<ServiceWorkerHandle> handle = 167 scoped_ptr<ServiceWorkerHandle> handle =
168 ServiceWorkerHandle::Create(context_, dispatcher_host_, 168 ServiceWorkerHandle::Create(context_, dispatcher_host_,
169 kDocumentMainThreadId, version); 169 kDocumentMainThreadId, version);
170 info = handle->GetObjectInfo(); 170 info = handle->GetObjectInfo();
171 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass()); 171 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass());
172 } 172 }
173 return info; 173 return info;
174 } 174 }
175 175
176 bool ServiceWorkerProviderHost::IsContextAlive() {
177 return context_ != NULL;
178 }
179
176 } // namespace content 180 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698