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

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

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "third_party/mojo/src/mojo/edk/system/handle_table.h" 5 #include "mojo/edk/system/handle_table.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "third_party/mojo/src/mojo/edk/system/configuration.h" 10 #include "mojo/edk/system/configuration.h"
11 #include "third_party/mojo/src/mojo/edk/system/dispatcher.h" 11 #include "mojo/edk/system/dispatcher.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace system { 14 namespace edk {
15 15
16 HandleTable::Entry::Entry() : busy(false) { 16 HandleTable::Entry::Entry() : busy(false) {
17 } 17 }
18 18
19 HandleTable::Entry::Entry(const scoped_refptr<Dispatcher>& dispatcher) 19 HandleTable::Entry::Entry(const scoped_refptr<Dispatcher>& dispatcher)
20 : dispatcher(dispatcher), busy(false) { 20 : dispatcher(dispatcher), busy(false) {
21 } 21 }
22 22
23 HandleTable::Entry::~Entry() { 23 HandleTable::Entry::~Entry() {
24 DCHECK(!busy); 24 DCHECK(!busy);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 DCHECK_LE(num_handles, GetConfiguration().max_message_num_handles); 232 DCHECK_LE(num_handles, GetConfiguration().max_message_num_handles);
233 233
234 for (uint32_t i = 0; i < num_handles; i++) { 234 for (uint32_t i = 0; i < num_handles; i++) {
235 HandleToEntryMap::iterator it = handle_to_entry_map_.find(handles[i]); 235 HandleToEntryMap::iterator it = handle_to_entry_map_.find(handles[i]);
236 DCHECK(it != handle_to_entry_map_.end()); 236 DCHECK(it != handle_to_entry_map_.end());
237 DCHECK(it->second.busy); 237 DCHECK(it->second.busy);
238 it->second.busy = false; 238 it->second.busy = false;
239 } 239 }
240 } 240 }
241 241
242 } // namespace system 242 } // namespace edk
243 } // namespace mojo 243 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698