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

Side by Side Diff: content/browser/shared_worker/shared_worker_service_impl.cc

Issue 1775933002: CORS-RFC1918: Pipe creator address space through SharedWorker creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 9 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
« no previous file with comments | « content/browser/shared_worker/shared_worker_instance_unittest.cc ('k') | content/common/DEPS » ('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/browser/shared_worker/shared_worker_service_impl.h" 5 #include "content/browser/shared_worker/shared_worker_service_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <iterator> 9 #include <iterator>
10 #include <set> 10 #include <set>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 const ViewHostMsg_CreateWorker_Params& params, 285 const ViewHostMsg_CreateWorker_Params& params,
286 int route_id, 286 int route_id,
287 SharedWorkerMessageFilter* filter, 287 SharedWorkerMessageFilter* filter,
288 ResourceContext* resource_context, 288 ResourceContext* resource_context,
289 const WorkerStoragePartitionId& partition_id, 289 const WorkerStoragePartitionId& partition_id,
290 blink::WebWorkerCreationError* creation_error) { 290 blink::WebWorkerCreationError* creation_error) {
291 DCHECK_CURRENTLY_ON(BrowserThread::IO); 291 DCHECK_CURRENTLY_ON(BrowserThread::IO);
292 *creation_error = blink::WebWorkerCreationErrorNone; 292 *creation_error = blink::WebWorkerCreationErrorNone;
293 scoped_ptr<SharedWorkerInstance> instance(new SharedWorkerInstance( 293 scoped_ptr<SharedWorkerInstance> instance(new SharedWorkerInstance(
294 params.url, params.name, params.content_security_policy, 294 params.url, params.name, params.content_security_policy,
295 params.security_policy_type, resource_context, partition_id, 295 params.security_policy_type, params.creation_address_space,
296 params.creation_context_type)); 296 resource_context, partition_id, params.creation_context_type));
297 scoped_ptr<SharedWorkerPendingInstance::SharedWorkerPendingRequest> request( 297 scoped_ptr<SharedWorkerPendingInstance::SharedWorkerPendingRequest> request(
298 new SharedWorkerPendingInstance::SharedWorkerPendingRequest( 298 new SharedWorkerPendingInstance::SharedWorkerPendingRequest(
299 filter, 299 filter,
300 route_id, 300 route_id,
301 params.document_id, 301 params.document_id,
302 filter->render_process_id(), 302 filter->render_process_id(),
303 params.render_frame_route_id)); 303 params.render_frame_route_id));
304 if (SharedWorkerPendingInstance* pending = FindPendingInstance(*instance)) { 304 if (SharedWorkerPendingInstance* pending = FindPendingInstance(*instance)) {
305 if (params.url != pending->instance()->url()) { 305 if (params.url != pending->instance()->url()) {
306 *creation_error = blink::WebWorkerCreationErrorURLMismatch; 306 *creation_error = blink::WebWorkerCreationErrorURLMismatch;
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 UpdateWorkerDependencyFunc new_func) { 665 UpdateWorkerDependencyFunc new_func) {
666 update_worker_dependency_ = new_func; 666 update_worker_dependency_ = new_func;
667 } 667 }
668 668
669 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting( 669 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting(
670 bool (*new_func)(int)) { 670 bool (*new_func)(int)) {
671 s_try_increment_worker_ref_count_ = new_func; 671 s_try_increment_worker_ref_count_ = new_func;
672 } 672 }
673 673
674 } // namespace content 674 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/shared_worker/shared_worker_instance_unittest.cc ('k') | content/common/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698