net: FileStream cleanup

Remove old "Async" prefix from a time when FileStream could perform sync
operations, and use base::File methods instead of reimplement them.

Remove a TODO from native_message_process_host given that we decided it is
not worth moving that functionality to FileStream ATM.

BUG=322664
TBR=sergeyu@chromium.org, kinuko@chromium.org
R=hashimoto@chromium.org

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

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


CrOS-Libchrome-Original-Commit: 633ff3b105c336337f8b4f37627e6df59b4bcf42
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index 0764ee9..a51aaa8 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -280,11 +280,16 @@
 int64 File::Seek(Whence whence, int64 offset) {
   base::ThreadRestrictions::AssertIOAllowed();
   DCHECK(IsValid());
-  if (offset < 0)
-    return -1;
 
+#if defined(OS_ANDROID)
+  COMPILE_ASSERT(sizeof(int64) == sizeof(off64_t), off64_t_64_bit);
+  return lseek64(file_.get(), static_cast<off64_t>(offset),
+                 static_cast<int>(whence));
+#else
+  COMPILE_ASSERT(sizeof(int64) == sizeof(off_t), off_t_64_bit);
   return lseek(file_.get(), static_cast<off_t>(offset),
                static_cast<int>(whence));
+#endif
 }
 
 int File::Read(int64 offset, char* data, int size) {