summaryrefslogtreecommitdiffstats
path: root/chrome/browser/worker_host/worker_document_set.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/worker_host/worker_document_set.cc')
-rw-r--r--chrome/browser/worker_host/worker_document_set.cc35
1 files changed, 19 insertions, 16 deletions
diff --git a/chrome/browser/worker_host/worker_document_set.cc b/chrome/browser/worker_host/worker_document_set.cc
index 3588bb1..0b3c634 100644
--- a/chrome/browser/worker_host/worker_document_set.cc
+++ b/chrome/browser/worker_host/worker_document_set.cc
@@ -4,32 +4,34 @@
#include "chrome/browser/worker_host/worker_document_set.h"
+#include "base/logging.h"
+
WorkerDocumentSet::WorkerDocumentSet() {
}
-void WorkerDocumentSet::Add(IPC::Message::Sender* parent,
+void WorkerDocumentSet::Add(WorkerMessageFilter* parent,
unsigned long long document_id,
- int renderer_id,
- int render_view_route_id) {
- DocumentInfo info(parent, document_id, renderer_id, render_view_route_id);
+ int render_process_id,
+ int render_view_id) {
+ DocumentInfo info(parent, document_id, render_process_id, render_view_id);
document_set_.insert(info);
}
-bool WorkerDocumentSet::Contains(IPC::Message::Sender* parent,
+bool WorkerDocumentSet::Contains(WorkerMessageFilter* parent,
unsigned long long document_id) const {
for (DocumentInfoSet::const_iterator i = document_set_.begin();
i != document_set_.end(); ++i) {
- if (i->sender() == parent && i->document_id() == document_id)
+ if (i->filter() == parent && i->document_id() == document_id)
return true;
}
return false;
}
-void WorkerDocumentSet::Remove(IPC::Message::Sender* parent,
+void WorkerDocumentSet::Remove(WorkerMessageFilter* parent,
unsigned long long document_id) {
for (DocumentInfoSet::iterator i = document_set_.begin();
i != document_set_.end(); i++) {
- if (i->sender() == parent && i->document_id() == document_id) {
+ if (i->filter() == parent && i->document_id() == document_id) {
document_set_.erase(i);
break;
}
@@ -38,14 +40,14 @@ void WorkerDocumentSet::Remove(IPC::Message::Sender* parent,
DCHECK(!Contains(parent, document_id));
}
-void WorkerDocumentSet::RemoveAll(IPC::Message::Sender* parent) {
+void WorkerDocumentSet::RemoveAll(WorkerMessageFilter* parent) {
for (DocumentInfoSet::iterator i = document_set_.begin();
i != document_set_.end();) {
// Note this idiom is somewhat tricky - calling document_set_.erase(iter)
// invalidates any iterators that point to the element being removed, so
// bump the iterator beyond the item being removed before calling erase.
- if (i->sender() == parent) {
+ if (i->filter() == parent) {
DocumentInfoSet::iterator item_to_delete = i++;
document_set_.erase(item_to_delete);
} else {
@@ -55,12 +57,13 @@ void WorkerDocumentSet::RemoveAll(IPC::Message::Sender* parent) {
}
WorkerDocumentSet::DocumentInfo::DocumentInfo(
- IPC::Message::Sender* sender, unsigned long long document_id,
- int renderer_id, int render_view_route_id)
- : sender_(sender),
+ WorkerMessageFilter* filter, unsigned long long document_id,
+ int render_process_id, int render_view_id)
+ : filter_(filter),
document_id_(document_id),
- renderer_id_(renderer_id),
- render_view_route_id_(render_view_route_id) {
+ render_process_id_(render_process_id),
+ render_view_id_(render_view_id) {
}
-WorkerDocumentSet::~WorkerDocumentSet() {}
+WorkerDocumentSet::~WorkerDocumentSet() {
+}