| OLD | NEW |
| 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" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 LocalDataPipeImpl(validated_options)); | 384 scoped_refptr<DataPipe> data_pipe( |
| 385 LocalDataPipeImpl::Create(validated_options)); |
| 385 producer_dispatcher->Init(data_pipe); | 386 producer_dispatcher->Init(data_pipe); |
| 386 consumer_dispatcher->Init(data_pipe); | 387 consumer_dispatcher->Init(data_pipe); |
| 387 | 388 |
| 388 data_pipe_producer_handle.Put(handle_pair.first); | 389 data_pipe_producer_handle.Put(handle_pair.first); |
| 389 data_pipe_consumer_handle.Put(handle_pair.second); | 390 data_pipe_consumer_handle.Put(handle_pair.second); |
| 390 return MOJO_RESULT_OK; | 391 return MOJO_RESULT_OK; |
| 391 } | 392 } |
| 392 | 393 |
| 393 MojoResult Core::WriteData(MojoHandle data_pipe_producer_handle, | 394 MojoResult Core::WriteData(MojoHandle data_pipe_producer_handle, |
| 394 UserPointer<const void> elements, | 395 UserPointer<const void> elements, |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 if (signals_states) { | 601 if (signals_states) { |
| 601 for (; i < num_handles; i++) | 602 for (; i < num_handles; i++) |
| 602 signals_states[i] = dispatchers[i]->GetHandleSignalsState(); | 603 signals_states[i] = dispatchers[i]->GetHandleSignalsState(); |
| 603 } | 604 } |
| 604 | 605 |
| 605 return rv; | 606 return rv; |
| 606 } | 607 } |
| 607 | 608 |
| 608 } // namespace system | 609 } // namespace system |
| 609 } // namespace mojo | 610 } // namespace mojo |
| OLD | NEW |