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

Side by Side Diff: ipc/file_descriptor_set_posix.cc

Issue 8437033: Android IPC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply dmac feedback plus sync/merge Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « build/android/run_tests.py ('k') | ipc/ipc.gyp » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_descriptor_set_posix.h" 5 #include "ipc/file_descriptor_set_posix.h"
6 6
7 #include <sys/types.h> 7 #include <sys/types.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 #include <unistd.h>
9 10
10 #include "base/eintr_wrapper.h" 11 #include "base/eintr_wrapper.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 13
13 FileDescriptorSet::FileDescriptorSet() 14 FileDescriptorSet::FileDescriptorSet()
14 : consumed_descriptor_highwater_(0) { 15 : consumed_descriptor_highwater_(0) {
15 } 16 }
16 17
17 FileDescriptorSet::~FileDescriptorSet() { 18 FileDescriptorSet::~FileDescriptorSet() {
18 if (consumed_descriptor_highwater_ == descriptors_.size()) 19 if (consumed_descriptor_highwater_ == descriptors_.size())
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 DCHECK_EQ(consumed_descriptor_highwater_, 0u); 128 DCHECK_EQ(consumed_descriptor_highwater_, 0u);
128 129
129 descriptors_.reserve(count); 130 descriptors_.reserve(count);
130 for (unsigned i = 0; i < count; ++i) { 131 for (unsigned i = 0; i < count; ++i) {
131 struct base::FileDescriptor sd; 132 struct base::FileDescriptor sd;
132 sd.fd = buffer[i]; 133 sd.fd = buffer[i];
133 sd.auto_close = true; 134 sd.auto_close = true;
134 descriptors_.push_back(sd); 135 descriptors_.push_back(sd);
135 } 136 }
136 } 137 }
OLDNEW
« no previous file with comments | « build/android/run_tests.py ('k') | ipc/ipc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698