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

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

Issue 936173002: Rename LocalDataPipe -> LocalDataPipeImpl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 10 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/BUILD.gn ('k') | mojo/edk/system/local_data_pipe.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/core.h" 5 #include "mojo/edk/system/core.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "mojo/edk/embedder/platform_shared_buffer.h" 11 #include "mojo/edk/embedder/platform_shared_buffer.h"
12 #include "mojo/edk/embedder/platform_support.h" 12 #include "mojo/edk/embedder/platform_support.h"
13 #include "mojo/edk/system/async_waiter.h" 13 #include "mojo/edk/system/async_waiter.h"
14 #include "mojo/edk/system/configuration.h" 14 #include "mojo/edk/system/configuration.h"
15 #include "mojo/edk/system/data_pipe.h" 15 #include "mojo/edk/system/data_pipe.h"
16 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h" 16 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h"
17 #include "mojo/edk/system/data_pipe_producer_dispatcher.h" 17 #include "mojo/edk/system/data_pipe_producer_dispatcher.h"
18 #include "mojo/edk/system/dispatcher.h" 18 #include "mojo/edk/system/dispatcher.h"
19 #include "mojo/edk/system/handle_signals_state.h" 19 #include "mojo/edk/system/handle_signals_state.h"
20 #include "mojo/edk/system/local_data_pipe.h" 20 #include "mojo/edk/system/local_data_pipe_impl.h"
21 #include "mojo/edk/system/memory.h" 21 #include "mojo/edk/system/memory.h"
22 #include "mojo/edk/system/message_pipe.h" 22 #include "mojo/edk/system/message_pipe.h"
23 #include "mojo/edk/system/message_pipe_dispatcher.h" 23 #include "mojo/edk/system/message_pipe_dispatcher.h"
24 #include "mojo/edk/system/shared_buffer_dispatcher.h" 24 #include "mojo/edk/system/shared_buffer_dispatcher.h"
25 #include "mojo/edk/system/waiter.h" 25 #include "mojo/edk/system/waiter.h"
26 #include "mojo/public/c/system/macros.h" 26 #include "mojo/public/c/system/macros.h"
27 27
28 namespace mojo { 28 namespace mojo {
29 namespace system { 29 namespace system {
30 30
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 } 374 }
375 if (handle_pair.first == MOJO_HANDLE_INVALID) { 375 if (handle_pair.first == MOJO_HANDLE_INVALID) {
376 DCHECK_EQ(handle_pair.second, MOJO_HANDLE_INVALID); 376 DCHECK_EQ(handle_pair.second, MOJO_HANDLE_INVALID);
377 LOG(ERROR) << "Handle table full"; 377 LOG(ERROR) << "Handle table full";
378 producer_dispatcher->Close(); 378 producer_dispatcher->Close();
379 consumer_dispatcher->Close(); 379 consumer_dispatcher->Close();
380 return MOJO_RESULT_RESOURCE_EXHAUSTED; 380 return MOJO_RESULT_RESOURCE_EXHAUSTED;
381 } 381 }
382 DCHECK_NE(handle_pair.second, MOJO_HANDLE_INVALID); 382 DCHECK_NE(handle_pair.second, MOJO_HANDLE_INVALID);
383 383
384 scoped_refptr<DataPipe> data_pipe(new LocalDataPipe(validated_options)); 384 scoped_refptr<DataPipe> data_pipe(new LocalDataPipeImpl(validated_options));
385 producer_dispatcher->Init(data_pipe); 385 producer_dispatcher->Init(data_pipe);
386 consumer_dispatcher->Init(data_pipe); 386 consumer_dispatcher->Init(data_pipe);
387 387
388 data_pipe_producer_handle.Put(handle_pair.first); 388 data_pipe_producer_handle.Put(handle_pair.first);
389 data_pipe_consumer_handle.Put(handle_pair.second); 389 data_pipe_consumer_handle.Put(handle_pair.second);
390 return MOJO_RESULT_OK; 390 return MOJO_RESULT_OK;
391 } 391 }
392 392
393 MojoResult Core::WriteData(MojoHandle data_pipe_producer_handle, 393 MojoResult Core::WriteData(MojoHandle data_pipe_producer_handle,
394 UserPointer<const void> elements, 394 UserPointer<const void> elements,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 if (signals_states) { 600 if (signals_states) {
601 for (; i < num_handles; i++) 601 for (; i < num_handles; i++)
602 signals_states[i] = dispatchers[i]->GetHandleSignalsState(); 602 signals_states[i] = dispatchers[i]->GetHandleSignalsState();
603 } 603 }
604 604
605 return rv; 605 return rv;
606 } 606 }
607 607
608 } // namespace system 608 } // namespace system
609 } // namespace mojo 609 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/local_data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698