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

Side by Side Diff: content/browser/shared_worker/shared_worker_instance.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
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_instance.h" 5 #include "content/browser/shared_worker/shared_worker_instance.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 SharedWorkerInstance::SharedWorkerInstance( 11 SharedWorkerInstance::SharedWorkerInstance(
12 const GURL& url, 12 const GURL& url,
13 const base::string16& name, 13 const base::string16& name,
14 const base::string16& content_security_policy, 14 const base::string16& content_security_policy,
15 blink::WebContentSecurityPolicyType security_policy_type, 15 blink::WebContentSecurityPolicyType security_policy_type,
16 blink::WebAddressSpace creation_address_space,
16 ResourceContext* resource_context, 17 ResourceContext* resource_context,
17 const WorkerStoragePartitionId& partition_id, 18 const WorkerStoragePartitionId& partition_id,
18 blink::WebSharedWorkerCreationContextType creation_context_type) 19 blink::WebSharedWorkerCreationContextType creation_context_type)
19 : url_(url), 20 : url_(url),
20 name_(name), 21 name_(name),
21 content_security_policy_(content_security_policy), 22 content_security_policy_(content_security_policy),
22 security_policy_type_(security_policy_type), 23 security_policy_type_(security_policy_type),
24 creation_address_space_(creation_address_space),
23 resource_context_(resource_context), 25 resource_context_(resource_context),
24 partition_id_(partition_id), 26 partition_id_(partition_id),
25 creation_context_type_(creation_context_type) { 27 creation_context_type_(creation_context_type) {
26 DCHECK(resource_context_); 28 DCHECK(resource_context_);
27 } 29 }
28 30
29 SharedWorkerInstance::SharedWorkerInstance(const SharedWorkerInstance& other) 31 SharedWorkerInstance::SharedWorkerInstance(const SharedWorkerInstance& other)
30 : url_(other.url_), 32 : url_(other.url_),
31 name_(other.name_), 33 name_(other.name_),
32 content_security_policy_(other.content_security_policy_), 34 content_security_policy_(other.content_security_policy_),
33 security_policy_type_(other.security_policy_type_), 35 security_policy_type_(other.security_policy_type_),
36 creation_address_space_(other.creation_address_space_),
34 resource_context_(other.resource_context_), 37 resource_context_(other.resource_context_),
35 partition_id_(other.partition_id_), 38 partition_id_(other.partition_id_),
36 creation_context_type_(other.creation_context_type_) {} 39 creation_context_type_(other.creation_context_type_) {}
37 40
38 SharedWorkerInstance::~SharedWorkerInstance() {} 41 SharedWorkerInstance::~SharedWorkerInstance() {}
39 42
40 bool SharedWorkerInstance::Matches(const GURL& match_url, 43 bool SharedWorkerInstance::Matches(const GURL& match_url,
41 const base::string16& match_name, 44 const base::string16& match_name,
42 const WorkerStoragePartitionId& partition_id, 45 const WorkerStoragePartitionId& partition_id,
43 ResourceContext* resource_context) const { 46 ResourceContext* resource_context) const {
(...skipping 17 matching lines...) Expand all
61 } 64 }
62 65
63 bool SharedWorkerInstance::Matches(const SharedWorkerInstance& other) const { 66 bool SharedWorkerInstance::Matches(const SharedWorkerInstance& other) const {
64 return Matches(other.url(), 67 return Matches(other.url(),
65 other.name(), 68 other.name(),
66 other.partition_id(), 69 other.partition_id(),
67 other.resource_context()); 70 other.resource_context());
68 } 71 }
69 72
70 } // namespace content 73 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698