Revert 257577 "Revert 257562 "Base: Make base::File use ScopedFD..."

Reland this: turns out not responsible.

> Revert 257562 "Base: Make base::File use ScopedFD on POSIX."
> 
> Might caused a bunch of layout test failures, at least on Linux
> 
> fast/dom/Window/property-access-on-cached-properties-after-frame-navigated.html,
> fast/dom/Window/property-access-on-cached-properties-after-frame-removed.html,
> fast/dom/Window/property-access-on-cached-window-after-frame-navigated.html,
> fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
> 
> > Base: Make base::File use ScopedFD on POSIX.
> > 
> > Now that ScopedFD lives outside of file_util, File can use it to remove manual
> > lifetime management.
> > 
> > This also standarizes the behavior on Close failures for all platforms.
> > 
> > BUG=none
> > 
> > Review URL: https://codereview.chromium.org/201083002
> 
> TBR=rvargas@chromium.org
> 
> Review URL: https://codereview.chromium.org/202583005

TBR=zmo@chromium.org

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

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


CrOS-Libchrome-Original-Commit: 49ec031c22cdccd490e5ea328c2c01a98e793e21
diff --git a/base/files/file.h b/base/files/file.h
index f6ca8f8..9c2479d 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -12,6 +12,7 @@
 
 #include "base/base_export.h"
 #include "base/basictypes.h"
+#include "base/files/scoped_file.h"
 #include "base/move.h"
 #include "base/time/time.h"
 
@@ -177,7 +178,7 @@
   //     return;
   Error error_details() const { return error_details_; }
 
-  PlatformFile GetPlatformFile() const { return file_; }
+  PlatformFile GetPlatformFile() const;
   PlatformFile TakePlatformFile();
 
   // Destroying this object closes the file automatically.
@@ -276,7 +277,7 @@
 #if defined(OS_WIN)
   win::ScopedHandle file_;
 #elif defined(OS_POSIX)
-  PlatformFile file_;
+  ScopedFD file_;
 #endif
 
   Error error_details_;