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

Side by Side Diff: base/posix/file_descriptor_shuffle.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 | « base/posix/eintr_wrapper.h ('k') | base/posix/unix_domain_socket.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 "base/posix/file_descriptor_shuffle.h" 5 #include "base/posix/file_descriptor_shuffle.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <ostream> 9 #include <ostream>
10 10
11 #include "base/eintr_wrapper.h" 11 #include "base/posix/eintr_wrapper.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 13
14 namespace base { 14 namespace base {
15 15
16 bool PerformInjectiveMultimapDestructive( 16 bool PerformInjectiveMultimapDestructive(
17 InjectiveMultimap* m, InjectionDelegate* delegate) { 17 InjectiveMultimap* m, InjectionDelegate* delegate) {
18 static const size_t kMaxExtraFDs = 16; 18 static const size_t kMaxExtraFDs = 16;
19 int extra_fds[kMaxExtraFDs]; 19 int extra_fds[kMaxExtraFDs];
20 unsigned next_extra_fd = 0; 20 unsigned next_extra_fd = 0;
21 21
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool FileDescriptorTableInjection::Move(int src, int dest) { 87 bool FileDescriptorTableInjection::Move(int src, int dest) {
88 return HANDLE_EINTR(dup2(src, dest)) != -1; 88 return HANDLE_EINTR(dup2(src, dest)) != -1;
89 } 89 }
90 90
91 void FileDescriptorTableInjection::Close(int fd) { 91 void FileDescriptorTableInjection::Close(int fd) {
92 int ret = HANDLE_EINTR(close(fd)); 92 int ret = HANDLE_EINTR(close(fd));
93 DPCHECK(ret == 0); 93 DPCHECK(ret == 0);
94 } 94 }
95 95
96 } // namespace base 96 } // namespace base
OLDNEW
« no previous file with comments | « base/posix/eintr_wrapper.h ('k') | base/posix/unix_domain_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698