Implement ScopedFD in terms of ScopedGeneric.

Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later.

I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified.

I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition).

Reland of https://codereview.chromium.org/191673003/
R=agl, viettrungluu

Review URL: https://codereview.chromium.org/202113004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257473 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 42f558fdef03f1ec2261f554151d8a4d168919e4
16 files changed
tree: 2e8139a50161496d30f2e766d758f07dc42cf856
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. ipc/
  6. mojo/
  7. testing/
  8. third_party/
  9. ui/