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

Unified Diff: mojo/public/cpp/bindings/lib/multiplex_router.cc

Issue 2611843004: Implement throttling behavior for LocalStorage mojo messages.
Patch Set: Created 3 years, 11 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 | « mojo/public/cpp/bindings/lib/multiplex_router.h ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/multiplex_router.cc
diff --git a/mojo/public/cpp/bindings/lib/multiplex_router.cc b/mojo/public/cpp/bindings/lib/multiplex_router.cc
index 14ea64740756a9377829c23512a2eb1b7b457603..fb4168d1efc585f64e0748b36115454e8b43a540 100644
--- a/mojo/public/cpp/bindings/lib/multiplex_router.cc
+++ b/mojo/public/cpp/bindings/lib/multiplex_router.cc
@@ -285,7 +285,8 @@ MultiplexRouter::MultiplexRouter(
ScopedMessagePipeHandle message_pipe,
Config config,
bool set_interface_id_namesapce_bit,
- scoped_refptr<base::SingleThreadTaskRunner> runner)
+ scoped_refptr<base::SingleThreadTaskRunner> runner,
+ ClientCallBehavior sync_client_call_behavior)
: set_interface_id_namespace_bit_(set_interface_id_namesapce_bit),
task_runner_(runner),
header_validator_(nullptr),
@@ -301,7 +302,8 @@ MultiplexRouter::MultiplexRouter(
posted_to_process_tasks_(false),
encountered_error_(false),
paused_(false),
- testing_mode_(false) {
+ testing_mode_(false),
+ sync_client_call_behavior_(sync_client_call_behavior) {
DCHECK(task_runner_->BelongsToCurrentThread());
if (config == SINGLE_INTERFACE_WITH_SYNC_METHODS ||
@@ -540,7 +542,7 @@ bool MultiplexRouter::Accept(Message* message) {
ClientCallBehavior client_call_behavior =
connector_.during_sync_handle_watcher_callback()
- ? ALLOW_DIRECT_CLIENT_CALLS_FOR_SYNC_MESSAGES
+ ? sync_client_call_behavior_
: ALLOW_DIRECT_CLIENT_CALLS;
bool processed =
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.h ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698