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

Side by Side Diff: ipc/file_descriptor_set_posix.cc

Issue 11366229: Move eintr_wrapper.h from base to base/posix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « dbus/message_unittest.cc ('k') | ipc/file_descriptor_set_posix_unittest.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) 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 #include <unistd.h>
10 10
11 #include "base/eintr_wrapper.h"
12 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/posix/eintr_wrapper.h"
13 13
14 FileDescriptorSet::FileDescriptorSet() 14 FileDescriptorSet::FileDescriptorSet()
15 : consumed_descriptor_highwater_(0) { 15 : consumed_descriptor_highwater_(0) {
16 } 16 }
17 17
18 FileDescriptorSet::~FileDescriptorSet() { 18 FileDescriptorSet::~FileDescriptorSet() {
19 if (consumed_descriptor_highwater_ == descriptors_.size()) 19 if (consumed_descriptor_highwater_ == descriptors_.size())
20 return; 20 return;
21 21
22 LOG(WARNING) << "FileDescriptorSet destroyed with unconsumed descriptors"; 22 LOG(WARNING) << "FileDescriptorSet destroyed with unconsumed descriptors";
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 DCHECK_EQ(consumed_descriptor_highwater_, 0u); 128 DCHECK_EQ(consumed_descriptor_highwater_, 0u);
129 129
130 descriptors_.reserve(count); 130 descriptors_.reserve(count);
131 for (unsigned i = 0; i < count; ++i) { 131 for (unsigned i = 0; i < count; ++i) {
132 struct base::FileDescriptor sd; 132 struct base::FileDescriptor sd;
133 sd.fd = buffer[i]; 133 sd.fd = buffer[i];
134 sd.auto_close = true; 134 sd.auto_close = true;
135 descriptors_.push_back(sd); 135 descriptors_.push_back(sd);
136 } 136 }
137 } 137 }
OLDNEW
« no previous file with comments | « dbus/message_unittest.cc ('k') | ipc/file_descriptor_set_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698