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

Side by Side Diff: mojo/edk/system/dispatcher.cc

Issue 2047823002: Remove no-longer-needed IsBusy...() stuff. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_dp_not_busy-x-work790_dp_cancel_two_phase
Patch Set: Created 4 years, 6 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
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/handle_transport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/edk/system/dispatcher.h" 5 #include "mojo/edk/system/dispatcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/edk/system/configuration.h" 8 #include "mojo/edk/system/configuration.h"
9 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h" 9 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h"
10 #include "mojo/edk/system/data_pipe_producer_dispatcher.h" 10 #include "mojo/edk/system/data_pipe_producer_dispatcher.h"
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 void* /*destination*/, 518 void* /*destination*/,
519 size_t* /*actual_size*/, 519 size_t* /*actual_size*/,
520 std::vector<ScopedPlatformHandle>* /*platform_handles*/) { 520 std::vector<ScopedPlatformHandle>* /*platform_handles*/) {
521 AssertHasOneRef(); // Only one ref => no need to take the lock. 521 AssertHasOneRef(); // Only one ref => no need to take the lock.
522 DCHECK(is_closed_); 522 DCHECK(is_closed_);
523 // By default, serializing isn't supported, so just close. 523 // By default, serializing isn't supported, so just close.
524 CloseImplNoLock(); 524 CloseImplNoLock();
525 return false; 525 return false;
526 } 526 }
527 527
528 bool Dispatcher::IsBusyNoLock() const {
529 mutex_.AssertHeld();
530 DCHECK(!is_closed_);
531 // Most dispatchers support only "atomic" operations, so they are never busy
532 // (in this sense).
533 return false;
534 }
535
536 void Dispatcher::CloseNoLock() { 528 void Dispatcher::CloseNoLock() {
537 mutex_.AssertHeld(); 529 mutex_.AssertHeld();
538 DCHECK(!is_closed_); 530 DCHECK(!is_closed_);
539 531
540 is_closed_ = true; 532 is_closed_ = true;
541 CancelAllStateNoLock(); 533 CancelAllStateNoLock();
542 CloseImplNoLock(); 534 CloseImplNoLock();
543 } 535 }
544 536
545 RefPtr<Dispatcher> Dispatcher::CreateEquivalentDispatcherAndCloseNoLock( 537 RefPtr<Dispatcher> Dispatcher::CreateEquivalentDispatcherAndCloseNoLock(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 // want to remove or weaken). 576 // want to remove or weaken).
585 MutexLocker locker(&mutex_); 577 MutexLocker locker(&mutex_);
586 #endif 578 #endif
587 579
588 return EndSerializeAndCloseImplNoLock(channel, destination, actual_size, 580 return EndSerializeAndCloseImplNoLock(channel, destination, actual_size,
589 platform_handles); 581 platform_handles);
590 } 582 }
591 583
592 } // namespace system 584 } // namespace system
593 } // namespace mojo 585 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/handle_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698