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

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

Issue 1942423002: EDK: Move DispatcherTransport to handle_transport.*. (Closed) Base URL: https://github.com/domokit/mojo.git@work789_edk_handle_9
Patch Set: rebased Created 4 years, 7 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/dispatcher.cc ('k') | mojo/edk/system/handle_transport.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 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 "mojo/edk/system/handle_table.h" 5 #include "mojo/edk/system/handle_table.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "mojo/edk/system/configuration.h" 11 #include "mojo/edk/system/configuration.h"
12 #include "mojo/edk/system/dispatcher.h" 12 #include "mojo/edk/system/dispatcher.h"
13 #include "mojo/edk/system/handle_transport.h"
13 14
14 using mojo::util::RefPtr; 15 using mojo::util::RefPtr;
15 16
16 namespace mojo { 17 namespace mojo {
17 namespace system { 18 namespace system {
18 19
19 HandleTable::Entry::Entry() : busy(false) { 20 HandleTable::Entry::Entry() : busy(false) {}
20 }
21 21
22 HandleTable::Entry::Entry(Handle&& handle) 22 HandleTable::Entry::Entry(Handle&& handle)
23 : handle(std::move(handle)), busy(false) {} 23 : handle(std::move(handle)), busy(false) {}
24 24
25 HandleTable::Entry::~Entry() { 25 HandleTable::Entry::~Entry() {
26 DCHECK(!busy); 26 DCHECK(!busy);
27 } 27 }
28 28
29 HandleTable::HandleTable(size_t max_handle_table_size) 29 HandleTable::HandleTable(size_t max_handle_table_size)
30 : max_handle_table_size_(max_handle_table_size), 30 : max_handle_table_size_(max_handle_table_size),
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 for (uint32_t i = 0; i < num_handles; i++) { 241 for (uint32_t i = 0; i < num_handles; i++) {
242 HandleToEntryMap::iterator it = handle_to_entry_map_.find(handle_values[i]); 242 HandleToEntryMap::iterator it = handle_to_entry_map_.find(handle_values[i]);
243 DCHECK(it != handle_to_entry_map_.end()); 243 DCHECK(it != handle_to_entry_map_.end());
244 DCHECK(it->second.busy); 244 DCHECK(it->second.busy);
245 it->second.busy = false; 245 it->second.busy = false;
246 } 246 }
247 } 247 }
248 248
249 } // namespace system 249 } // namespace system
250 } // namespace mojo 250 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/dispatcher.cc ('k') | mojo/edk/system/handle_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698