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

Side by Side Diff: base/file_descriptor_shuffle.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « base/environment.cc ('k') | base/file_path.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/file_descriptor_shuffle.h" 5 #include <stddef.h>
6
7 #include <errno.h>
8 #include <unistd.h> 6 #include <unistd.h>
7 #include <vector>
9 8
10 #include "base/eintr_wrapper.h" 9 #include "base/eintr_wrapper.h"
10 #include "base/file_descriptor_shuffle.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 12
13 namespace base { 13 namespace base {
14 14
15 bool PerformInjectiveMultimapDestructive( 15 bool PerformInjectiveMultimapDestructive(
16 InjectiveMultimap* m, InjectionDelegate* delegate) { 16 InjectiveMultimap* m, InjectionDelegate* delegate) {
17 static const size_t kMaxExtraFDs = 16; 17 static const size_t kMaxExtraFDs = 16;
18 int extra_fds[kMaxExtraFDs]; 18 int extra_fds[kMaxExtraFDs];
19 unsigned next_extra_fd = 0; 19 unsigned next_extra_fd = 0;
20 20
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool FileDescriptorTableInjection::Move(int src, int dest) { 86 bool FileDescriptorTableInjection::Move(int src, int dest) {
87 return HANDLE_EINTR(dup2(src, dest)) != -1; 87 return HANDLE_EINTR(dup2(src, dest)) != -1;
88 } 88 }
89 89
90 void FileDescriptorTableInjection::Close(int fd) { 90 void FileDescriptorTableInjection::Close(int fd) {
91 int ret = HANDLE_EINTR(close(fd)); 91 int ret = HANDLE_EINTR(close(fd));
92 DPCHECK(ret == 0); 92 DPCHECK(ret == 0);
93 } 93 }
94 94
95 } // namespace base 95 } // namespace base
OLDNEW
« no previous file with comments | « base/environment.cc ('k') | base/file_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698