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

Unified Diff: content/browser/zygote_host/zygote_host_impl_linux.cc

Issue 202113004: Implement ScopedFD in terms of ScopedGeneric. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/child/npapi/np_channel_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_host/zygote_host_impl_linux.cc
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index 18e9b69309436b5c5ad924fea2939807e5c66a7e..aaf4d3b686e916a53f217bad0a33bc043a191f23 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -14,6 +14,7 @@
#include "base/environment.h"
#include "base/file_util.h"
#include "base/files/file_enumerator.h"
+#include "base/files/scoped_file.h"
#include "base/linux_util.h"
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
@@ -318,7 +319,7 @@ pid_t ZygoteHostImpl::ForkRequest(
std::vector<int> fds;
// Scoped pointers cannot be stored in containers, so we have to use a
// linked_ptr.
- std::vector<linked_ptr<file_util::ScopedFD> > autodelete_fds;
+ std::vector<linked_ptr<base::ScopedFD> > autodelete_fds;
for (std::vector<FileDescriptorInfo>::const_iterator
i = mapping.begin(); i != mapping.end(); ++i) {
pickle.WriteUInt32(i->id);
@@ -326,8 +327,7 @@ pid_t ZygoteHostImpl::ForkRequest(
if (i->fd.auto_close) {
// Auto-close means we need to close the FDs after they have been passed
// to the other process.
- linked_ptr<file_util::ScopedFD> ptr(
- new file_util::ScopedFD(&(fds.back())));
+ linked_ptr<base::ScopedFD> ptr(new base::ScopedFD(fds.back()));
autodelete_fds.push_back(ptr);
}
}
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | content/child/npapi/np_channel_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698