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

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

Issue 1365383004: Cleanup: Remove internal two-phase data pipe all-or-none support. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/local_data_pipe_impl.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/data_pipe_producer_dispatcher.h" 5 #include "mojo/edk/system/data_pipe_producer_dispatcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/edk/system/data_pipe.h" 8 #include "mojo/edk/system/data_pipe.h"
9 #include "mojo/edk/system/memory.h" 9 #include "mojo/edk/system/memory.h"
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 MojoResult DataPipeProducerDispatcher::BeginWriteDataImplNoLock( 81 MojoResult DataPipeProducerDispatcher::BeginWriteDataImplNoLock(
82 UserPointer<void*> buffer, 82 UserPointer<void*> buffer,
83 UserPointer<uint32_t> buffer_num_bytes, 83 UserPointer<uint32_t> buffer_num_bytes,
84 MojoWriteDataFlags flags) { 84 MojoWriteDataFlags flags) {
85 mutex().AssertHeld(); 85 mutex().AssertHeld();
86 86
87 // This flag may not be used in two-phase mode. 87 // This flag may not be used in two-phase mode.
88 if ((flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE)) 88 if ((flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE))
89 return MOJO_RESULT_INVALID_ARGUMENT; 89 return MOJO_RESULT_INVALID_ARGUMENT;
90 90
91 // TODO(vtl): Remove all-or-none support at lower levels. 91 return data_pipe_->ProducerBeginWriteData(buffer, buffer_num_bytes);
92 return data_pipe_->ProducerBeginWriteData(buffer, buffer_num_bytes, false);
93 } 92 }
94 93
95 MojoResult DataPipeProducerDispatcher::EndWriteDataImplNoLock( 94 MojoResult DataPipeProducerDispatcher::EndWriteDataImplNoLock(
96 uint32_t num_bytes_written) { 95 uint32_t num_bytes_written) {
97 mutex().AssertHeld(); 96 mutex().AssertHeld();
98 97
99 return data_pipe_->ProducerEndWriteData(num_bytes_written); 98 return data_pipe_->ProducerEndWriteData(num_bytes_written);
100 } 99 }
101 100
102 HandleSignalsState DataPipeProducerDispatcher::GetHandleSignalsStateImplNoLock() 101 HandleSignalsState DataPipeProducerDispatcher::GetHandleSignalsStateImplNoLock()
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return rv; 142 return rv;
144 } 143 }
145 144
146 bool DataPipeProducerDispatcher::IsBusyNoLock() const { 145 bool DataPipeProducerDispatcher::IsBusyNoLock() const {
147 mutex().AssertHeld(); 146 mutex().AssertHeld();
148 return data_pipe_->ProducerIsBusy(); 147 return data_pipe_->ProducerIsBusy();
149 } 148 }
150 149
151 } // namespace system 150 } // namespace system
152 } // namespace mojo 151 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/data_pipe_impl_unittest.cc ('k') | mojo/edk/system/local_data_pipe_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698