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

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

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (!associated_registration_) 179 if (!associated_registration_)
180 return; 180 return;
181 associated_registration_->RemoveListener(this); 181 associated_registration_->RemoveListener(this);
182 associated_registration_ = NULL; 182 associated_registration_ = NULL;
183 ClearVersionAttributes(); 183 ClearVersionAttributes();
184 } 184 }
185 185
186 scoped_ptr<ServiceWorkerRequestHandler> 186 scoped_ptr<ServiceWorkerRequestHandler>
187 ServiceWorkerProviderHost::CreateRequestHandler( 187 ServiceWorkerProviderHost::CreateRequestHandler(
188 ResourceType resource_type, 188 ResourceType resource_type,
189 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context) { 189 base::WeakPtr<storage::BlobStorageContext> blob_storage_context) {
190 if (IsHostToRunningServiceWorker()) { 190 if (IsHostToRunningServiceWorker()) {
191 return scoped_ptr<ServiceWorkerRequestHandler>( 191 return scoped_ptr<ServiceWorkerRequestHandler>(
192 new ServiceWorkerContextRequestHandler( 192 new ServiceWorkerContextRequestHandler(
193 context_, AsWeakPtr(), blob_storage_context, resource_type)); 193 context_, AsWeakPtr(), blob_storage_context, resource_type));
194 } 194 }
195 if (ServiceWorkerUtils::IsMainResourceType(resource_type) || 195 if (ServiceWorkerUtils::IsMainResourceType(resource_type) ||
196 active_version()) { 196 active_version()) {
197 return scoped_ptr<ServiceWorkerRequestHandler>( 197 return scoped_ptr<ServiceWorkerRequestHandler>(
198 new ServiceWorkerControlleeRequestHandler( 198 new ServiceWorkerControlleeRequestHandler(
199 context_, AsWeakPtr(), blob_storage_context, resource_type)); 199 context_, AsWeakPtr(), blob_storage_context, resource_type));
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass()); 245 dispatcher_host_->RegisterServiceWorkerHandle(handle.Pass());
246 } 246 }
247 return info; 247 return info;
248 } 248 }
249 249
250 bool ServiceWorkerProviderHost::IsContextAlive() { 250 bool ServiceWorkerProviderHost::IsContextAlive() {
251 return context_ != NULL; 251 return context_ != NULL;
252 } 252 }
253 253
254 } // namespace content 254 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698