Index: content/browser/shared_worker/shared_worker_instance.cc |
diff --git a/content/browser/shared_worker/shared_worker_instance.cc b/content/browser/shared_worker/shared_worker_instance.cc |
index 506626a54e17612e99d78c734fbb038e42cdc27e..a4965a55085e323fbc12ceddbe838a5c60779448 100644 |
--- a/content/browser/shared_worker/shared_worker_instance.cc |
+++ b/content/browser/shared_worker/shared_worker_instance.cc |
@@ -24,8 +24,15 @@ SharedWorkerInstance::SharedWorkerInstance( |
DCHECK(resource_context_); |
} |
-SharedWorkerInstance::~SharedWorkerInstance() { |
-} |
+SharedWorkerInstance::SharedWorkerInstance(const SharedWorkerInstance& other) |
+ : url_(other.url_), |
+ name_(other.name_), |
+ content_security_policy_(other.content_security_policy_), |
+ security_policy_type_(other.security_policy_type_), |
+ resource_context_(other.resource_context_), |
+ partition_(other.partition_) {} |
+ |
+SharedWorkerInstance::~SharedWorkerInstance() {} |
bool SharedWorkerInstance::Matches(const GURL& match_url, |
const base::string16& match_name, |
@@ -50,4 +57,9 @@ bool SharedWorkerInstance::Matches(const GURL& match_url, |
return name_ == match_name; |
} |
+bool SharedWorkerInstance::Matches(const SharedWorkerInstance& other) const { |
+ return Matches( |
+ other.url(), other.name(), other.partition(), other.resource_context()); |
+} |
+ |
} // namespace content |