diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-27 18:40:50 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-27 18:40:50 +0000 |
commit | 19b5c90babcde9f48ed94a90bc390b6f750f245a (patch) | |
tree | 699b01e6b6ac1b405890d85085eaed2a07b08a36 /mojo/system/dispatcher.cc | |
parent | c532e56ac387b94c75cd76099c2fabe12afa5b20 (diff) | |
download | chromium_src-19b5c90babcde9f48ed94a90bc390b6f750f245a.zip chromium_src-19b5c90babcde9f48ed94a90bc390b6f750f245a.tar.gz chromium_src-19b5c90babcde9f48ed94a90bc390b6f750f245a.tar.bz2 |
Revert 253869 "Mojo: Add hooks for dispatchers to serialize them..."
> Mojo: Add hooks for dispatchers to serialize themselves.
>
> R=yzshen@chromium.org
>
> Review URL: https://codereview.chromium.org/182163002
TBR=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/183173004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/system/dispatcher.cc')
-rw-r--r-- | mojo/system/dispatcher.cc | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/mojo/system/dispatcher.cc b/mojo/system/dispatcher.cc index 3d970d0..ac02b83 100644 --- a/mojo/system/dispatcher.cc +++ b/mojo/system/dispatcher.cc @@ -28,23 +28,6 @@ DispatcherTransport Dispatcher::CoreImplAccess::TryStartTransport( return DispatcherTransport(dispatcher); } -// static -size_t Dispatcher::MessageInTransitAccess::GetMaximumSerializedSize( - const Dispatcher* dispatcher, - const Channel* channel) { - DCHECK(dispatcher); - return dispatcher->GetMaximumSerializedSize(channel); -} - -// static -size_t Dispatcher::MessageInTransitAccess::SerializeAndClose( - Dispatcher* dispatcher, - void* destination, - Channel* channel) { - DCHECK(dispatcher); - return dispatcher->SerializeAndClose(destination, channel); -} - MojoResult Dispatcher::Close() { base::AutoLock locker(lock_); if (is_closed_) @@ -314,23 +297,6 @@ void Dispatcher::RemoveWaiterImplNoLock(Waiter* /*waiter*/) { // will do something nontrivial. } -size_t Dispatcher::GetMaximumSerializedSizeImplNoLock( - const Channel* /*channel*/) const { - lock_.AssertAcquired(); - DCHECK(!is_closed_); - // By default, serializing isn't supported. - return 0; -} - -size_t Dispatcher::SerializeAndCloseImplNoLock(void* /*destination*/, - Channel* /*channel*/) { - lock_.AssertAcquired(); - DCHECK(is_closed_); - // By default, serializing isn't supported, so just close. - CloseImplNoLock(); - return 0; -} - bool Dispatcher::IsBusyNoLock() const { lock_.AssertAcquired(); DCHECK(!is_closed_); @@ -358,39 +324,6 @@ Dispatcher::CreateEquivalentDispatcherAndCloseNoLock() { return CreateEquivalentDispatcherAndCloseImplNoLock(); } -size_t Dispatcher::GetMaximumSerializedSize(const Channel* channel) const { - DCHECK(channel); - DCHECK(HasOneRef()); - - base::AutoLock locker(lock_); - DCHECK(!is_closed_); - return GetMaximumSerializedSizeImplNoLock(channel); -} - -size_t Dispatcher::SerializeAndClose(void* destination, Channel* channel) { - DCHECK(destination); - DCHECK(channel); - DCHECK(HasOneRef()); - - base::AutoLock locker(lock_); - DCHECK(!is_closed_); - - // We have to call |GetMaximumSerializedSizeImplNoLock()| first, because we - // leave it to |SerializeAndCloseImplNoLock()| to close the thing. - size_t max_size = DCHECK_IS_ON() ? - GetMaximumSerializedSizeImplNoLock(channel) : static_cast<size_t>(-1); - - // Like other |...Close()| methods, we mark ourselves as closed before calling - // the impl. - is_closed_ = true; - // No need to cancel waiters: we shouldn't have any (and shouldn't be in - // |Core|'s handle table. - - size_t size = SerializeAndCloseImplNoLock(destination, channel); - DCHECK_LE(size, max_size); - return size; -} - // DispatcherTransport --------------------------------------------------------- void DispatcherTransport::End() { |