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

Side by Side Diff: ipc/ipc_channel_nacl.cc

Issue 1322253003: ipc: Convert int types from basictypes.h to the ones from stdint.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 3 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 | « ipc/ipc_channel.cc ('k') | ipc/ipc_channel_posix.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_channel_nacl.h" 5 #include "ipc/ipc_channel_nacl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h>
9 #include <sys/types.h> 10 #include <sys/types.h>
10 11
11 #include <algorithm> 12 #include <algorithm>
12 13
13 #include "base/bind.h" 14 #include "base/bind.h"
14 #include "base/logging.h" 15 #include "base/logging.h"
15 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
16 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
17 #include "base/task_runner_util.h" 18 #include "base/task_runner_util.h"
18 #include "base/thread_task_runner_handle.h" 19 #include "base/thread_task_runner_handle.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 352 }
352 } 353 }
353 return READ_SUCCEEDED; 354 return READ_SUCCEEDED;
354 } 355 }
355 356
356 bool ChannelNacl::ShouldDispatchInputMessage(Message* msg) { 357 bool ChannelNacl::ShouldDispatchInputMessage(Message* msg) {
357 return true; 358 return true;
358 } 359 }
359 360
360 bool ChannelNacl::GetNonBrokeredAttachments(Message* msg) { 361 bool ChannelNacl::GetNonBrokeredAttachments(Message* msg) {
361 uint16 header_fds = msg->header()->num_fds; 362 uint16_t header_fds = msg->header()->num_fds;
362 CHECK(header_fds == input_fds_.size()); 363 CHECK(header_fds == input_fds_.size());
363 if (header_fds == 0) 364 if (header_fds == 0)
364 return true; // Nothing to do. 365 return true; // Nothing to do.
365 366
366 // The shenaniganery below with &foo.front() requires input_fds_ to have 367 // The shenaniganery below with &foo.front() requires input_fds_ to have
367 // contiguous underlying storage (such as a simple array or a std::vector). 368 // contiguous underlying storage (such as a simple array or a std::vector).
368 // This is why the header warns not to make input_fds_ a deque<>. 369 // This is why the header warns not to make input_fds_ a deque<>.
369 msg->attachment_set()->AddDescriptorsToOwn(&input_fds_.front(), header_fds); 370 msg->attachment_set()->AddDescriptorsToOwn(&input_fds_.front(), header_fds);
370 input_fds_.clear(); 371 input_fds_.clear();
371 return true; 372 return true;
(...skipping 25 matching lines...) Expand all
397 // static 398 // static
398 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle, 399 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle,
399 Mode mode, 400 Mode mode,
400 Listener* listener, 401 Listener* listener,
401 AttachmentBroker* broker) { 402 AttachmentBroker* broker) {
402 return scoped_ptr<Channel>( 403 return scoped_ptr<Channel>(
403 new ChannelNacl(channel_handle, mode, listener, broker)); 404 new ChannelNacl(channel_handle, mode, listener, broker));
404 } 405 }
405 406
406 } // namespace IPC 407 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel.cc ('k') | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698