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

Side by Side Diff: mojo/public/cpp/bindings/lib/multiplex_router.cc

Issue 2750373002: Revert of Mojo: Armed Watchers (Closed)
Patch Set: Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/public/cpp/bindings/lib/multiplex_router.h" 5 #include "mojo/public/cpp/bindings/lib/multiplex_router.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 MayAutoLock locker(&lock_); 598 MayAutoLock locker(&lock_);
599 599
600 if (endpoints_.size() > 1) 600 if (endpoints_.size() > 1)
601 return true; 601 return true;
602 if (endpoints_.size() == 0) 602 if (endpoints_.size() == 0)
603 return false; 603 return false;
604 604
605 return !base::ContainsKey(endpoints_, kMasterInterfaceId); 605 return !base::ContainsKey(endpoints_, kMasterInterfaceId);
606 } 606 }
607 607
608 void MultiplexRouter::EnableNestedDispatch(bool enabled) {
609 DCHECK(thread_checker_.CalledOnValidThread());
610 connector_.EnableNestedDispatch(enabled);
611 }
612
613 void MultiplexRouter::EnableTestingMode() { 608 void MultiplexRouter::EnableTestingMode() {
614 DCHECK(thread_checker_.CalledOnValidThread()); 609 DCHECK(thread_checker_.CalledOnValidThread());
615 MayAutoLock locker(&lock_); 610 MayAutoLock locker(&lock_);
616 611
617 testing_mode_ = true; 612 testing_mode_ = true;
618 connector_.set_enforce_errors_from_incoming_receiver(false); 613 connector_.set_enforce_errors_from_incoming_receiver(false);
619 } 614 }
620 615
621 bool MultiplexRouter::Accept(Message* message) { 616 bool MultiplexRouter::Accept(Message* message) {
622 DCHECK(thread_checker_.CalledOnValidThread()); 617 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 977
983 void MultiplexRouter::AssertLockAcquired() { 978 void MultiplexRouter::AssertLockAcquired() {
984 #if DCHECK_IS_ON() 979 #if DCHECK_IS_ON()
985 if (lock_) 980 if (lock_)
986 lock_->AssertAcquired(); 981 lock_->AssertAcquired();
987 #endif 982 #endif
988 } 983 }
989 984
990 } // namespace internal 985 } // namespace internal
991 } // namespace mojo 986 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.h ('k') | mojo/public/cpp/bindings/tests/connector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698