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

Side by Side Diff: content/browser/quota_dispatcher_host.cc

Issue 165333004: Revert "Allow MessageFilters to restrict listening to specific message classes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/quota_dispatcher_host.h" 5 #include "content/browser/quota_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "content/common/quota_messages.h" 10 #include "content/common/quota_messages.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 int64 current_quota_; 214 int64 current_quota_;
215 int64 requested_quota_; 215 int64 requested_quota_;
216 const int render_view_id_; 216 const int render_view_id_;
217 base::WeakPtrFactory<self_type> weak_factory_; 217 base::WeakPtrFactory<self_type> weak_factory_;
218 }; 218 };
219 219
220 QuotaDispatcherHost::QuotaDispatcherHost( 220 QuotaDispatcherHost::QuotaDispatcherHost(
221 int process_id, 221 int process_id,
222 QuotaManager* quota_manager, 222 QuotaManager* quota_manager,
223 QuotaPermissionContext* permission_context) 223 QuotaPermissionContext* permission_context)
224 : BrowserMessageFilter(QuotaMsgStart), 224 : process_id_(process_id),
225 process_id_(process_id),
226 quota_manager_(quota_manager), 225 quota_manager_(quota_manager),
227 permission_context_(permission_context), 226 permission_context_(permission_context),
228 weak_factory_(this) { 227 weak_factory_(this) {
229 } 228 }
230 229
231 bool QuotaDispatcherHost::OnMessageReceived( 230 bool QuotaDispatcherHost::OnMessageReceived(
232 const IPC::Message& message, bool* message_was_ok) { 231 const IPC::Message& message, bool* message_was_ok) {
233 *message_was_ok = true; 232 *message_was_ok = true;
234 bool handled = true; 233 bool handled = true;
235 IPC_BEGIN_MESSAGE_MAP_EX(QuotaDispatcherHost, message, *message_was_ok) 234 IPC_BEGIN_MESSAGE_MAP_EX(QuotaDispatcherHost, message, *message_was_ok)
(...skipping 30 matching lines...) Expand all
266 return; 265 return;
267 } 266 }
268 267
269 RequestQuotaDispatcher* dispatcher = new RequestQuotaDispatcher( 268 RequestQuotaDispatcher* dispatcher = new RequestQuotaDispatcher(
270 weak_factory_.GetWeakPtr(), request_id, origin, type, 269 weak_factory_.GetWeakPtr(), request_id, origin, type,
271 requested_size, render_view_id); 270 requested_size, render_view_id);
272 dispatcher->Start(); 271 dispatcher->Start();
273 } 272 }
274 273
275 } // namespace content 274 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/profiler_message_filter.cc ('k') | content/browser/renderer_host/clipboard_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698