Revert of Base: Make FileProxy automaticaly close the file on a worker thread. (https://codereview.chromium.org/231703002/)

Reason for revert:
Triggering AssertIOAllowed on a handful of Blink LayoutTests.

Original issue's description:
> Base: Make FileProxy automaticaly close the file on a worker thread.
> 
> This CL removes the restriction that callers should call Close before
> deleting the object if they want to make sure the file is not closed
> on the current thread.
> 
> BUG=322664
> TEST=base_unittests
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263675

TBR=willchan@chromium.org,rvargas@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=322664

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

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


CrOS-Libchrome-Original-Commit: 850a6e979ec81047da2f126c11f620e77e1f3ac9
diff --git a/base/files/file_proxy.h b/base/files/file_proxy.h
index 3c834f6..f02960b 100644
--- a/base/files/file_proxy.h
+++ b/base/files/file_proxy.h
@@ -25,8 +25,11 @@
 // same rules of the equivalent File method, as they are implemented by bouncing
 // the operation to File using a TaskRunner.
 //
-// This class performs automatic proxying to close the underlying file at
-// destruction.
+// This class does NOT perform automatic proxying to close the underlying file
+// at destruction, which means that it may potentially close the file in the
+// wrong thread (the current thread). If that is not appropriate, the caller
+// must ensure that Close() is called, so that the operation happens on the
+// desired thread.
 //
 // The TaskRunner is in charge of any sequencing of the operations, but a single
 // operation can be proxied at a time, regardless of the use of a callback.
@@ -128,7 +131,6 @@
  private:
   friend class FileHelper;
   void SetFile(File file);
-  TaskRunner* task_runner() { return task_runner_.get(); }
 
   scoped_refptr<TaskRunner> task_runner_;
   File file_;