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 a55dd918152761871ea6aa06de5f4e7c0ce82ed7..506626a54e17612e99d78c734fbb038e42cdc27e 100644 |
--- a/content/browser/shared_worker/shared_worker_instance.cc |
+++ b/content/browser/shared_worker/shared_worker_instance.cc |
@@ -5,7 +5,6 @@ |
#include "content/browser/shared_worker/shared_worker_instance.h" |
#include "base/logging.h" |
-#include "content/browser/worker_host/worker_document_set.h" |
namespace content { |
@@ -17,40 +16,21 @@ SharedWorkerInstance::SharedWorkerInstance( |
ResourceContext* resource_context, |
const WorkerStoragePartition& partition) |
: url_(url), |
- closed_(false), |
name_(name), |
content_security_policy_(content_security_policy), |
security_policy_type_(security_policy_type), |
- worker_document_set_(new WorkerDocumentSet()), |
resource_context_(resource_context), |
- partition_(partition), |
- load_failed_(false) { |
+ partition_(partition) { |
DCHECK(resource_context_); |
} |
SharedWorkerInstance::~SharedWorkerInstance() { |
} |
-void SharedWorkerInstance::SetMessagePortID( |
- SharedWorkerMessageFilter* filter, |
- int route_id, |
- int message_port_id) { |
- for (FilterList::iterator i = filters_.begin(); i != filters_.end(); ++i) { |
- if (i->filter() == filter && i->route_id() == route_id) { |
- i->set_message_port_id(message_port_id); |
- return; |
- } |
- } |
-} |
- |
bool SharedWorkerInstance::Matches(const GURL& match_url, |
const base::string16& match_name, |
const WorkerStoragePartition& partition, |
ResourceContext* resource_context) const { |
- // Only match open shared workers. |
- if (closed_) |
- return false; |
- |
// ResourceContext equivalence is being used as a proxy to ensure we only |
// matched shared workers within the same BrowserContext. |
if (resource_context_ != resource_context) |
@@ -70,32 +50,4 @@ bool SharedWorkerInstance::Matches(const GURL& match_url, |
return name_ == match_name; |
} |
-void SharedWorkerInstance::AddFilter(SharedWorkerMessageFilter* filter, |
- int route_id) { |
- CHECK(filter); |
- if (!HasFilter(filter, route_id)) { |
- FilterInfo info(filter, route_id); |
- filters_.push_back(info); |
- } |
-} |
- |
-void SharedWorkerInstance::RemoveFilters(SharedWorkerMessageFilter* filter) { |
- for (FilterList::iterator i = filters_.begin(); i != filters_.end();) { |
- if (i->filter() == filter) |
- i = filters_.erase(i); |
- else |
- ++i; |
- } |
-} |
- |
-bool SharedWorkerInstance::HasFilter(SharedWorkerMessageFilter* filter, |
- int route_id) const { |
- for (FilterList::const_iterator i = filters_.begin(); i != filters_.end(); |
- ++i) { |
- if (i->filter() == filter && i->route_id() == route_id) |
- return true; |
- } |
- return false; |
-} |
- |
} // namespace content |