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

Unified Diff: trunk/src/content/child/child_thread.cc

Issue 21039004: Revert 214172 "Revert 214162 "Make Platform::queryStorageUsageAn..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/content/child/child_thread.h ('k') | trunk/src/content/child/quota_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/child/child_thread.cc
===================================================================
--- trunk/src/content/child/child_thread.cc (revision 214172)
+++ trunk/src/content/child/child_thread.cc (working copy)
@@ -20,6 +20,7 @@
#include "content/child/child_resource_message_filter.h"
#include "content/child/fileapi/file_system_dispatcher.h"
#include "content/child/quota_dispatcher.h"
+#include "content/child/quota_message_filter.h"
#include "content/child/resource_dispatcher.h"
#include "content/child/socket_stream_dispatcher.h"
#include "content/child/thread_safe_sender.h"
@@ -129,24 +130,30 @@
IPC::Logging::GetInstance()->SetIPCSender(this);
#endif
+ sync_message_filter_ =
+ new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent());
+ thread_safe_sender_ = new ThreadSafeSender(
+ base::MessageLoopProxy::current().get(), sync_message_filter_.get());
+
resource_dispatcher_.reset(new ResourceDispatcher(this));
socket_stream_dispatcher_.reset(new SocketStreamDispatcher());
file_system_dispatcher_.reset(new FileSystemDispatcher());
- quota_dispatcher_.reset(new QuotaDispatcher());
- sync_message_filter_ =
- new IPC::SyncMessageFilter(ChildProcess::current()->GetShutDownEvent());
- thread_safe_sender_ = new ThreadSafeSender(
- base::MessageLoopProxy::current().get(), sync_message_filter_.get());
histogram_message_filter_ = new ChildHistogramMessageFilter();
resource_message_filter_ =
new ChildResourceMessageFilter(resource_dispatcher());
+ quota_message_filter_ =
+ new QuotaMessageFilter(thread_safe_sender_.get());
+ quota_dispatcher_.reset(new QuotaDispatcher(thread_safe_sender_.get(),
+ quota_message_filter_.get()));
+
channel_->AddFilter(histogram_message_filter_.get());
channel_->AddFilter(sync_message_filter_.get());
channel_->AddFilter(new tracing::ChildTraceMessageFilter(
ChildProcess::current()->io_message_loop_proxy()));
channel_->AddFilter(resource_message_filter_.get());
+ channel_->AddFilter(quota_message_filter_.get());
#if defined(OS_POSIX)
// Check that --process-type is specified so we don't do this in unit tests
@@ -192,6 +199,7 @@
IPC::Logging::GetInstance()->SetIPCSender(NULL);
#endif
+ channel_->RemoveFilter(quota_message_filter_.get());
channel_->RemoveFilter(histogram_message_filter_.get());
channel_->RemoveFilter(sync_message_filter_.get());
@@ -296,8 +304,6 @@
return true;
if (file_system_dispatcher_->OnMessageReceived(msg))
return true;
- if (quota_dispatcher_->OnMessageReceived(msg))
- return true;
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(ChildThread, msg)
« no previous file with comments | « trunk/src/content/child/child_thread.h ('k') | trunk/src/content/child/quota_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698