net: Update FileStream to use base::File instead of PlatformFile.

As collateral damage, OpenContentUriForRead is now returning File instead of
a plain file descriptor.

BUG=322664
TEST=net_unittests
R=willchan@chromium.org

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

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


CrOS-Libchrome-Original-Commit: a0830591020c23ad911aa287390a4ae942c5dc41
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index 4bdd90f..642c9d5 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -2451,9 +2451,9 @@
 
   // We should be able to read the file.
   char* buffer = new char[image_size];
-  int fd = OpenContentUriForRead(path);
-  EXPECT_LT(0, fd);
-  EXPECT_TRUE(ReadFromFD(fd, buffer, image_size));
+  File file = OpenContentUriForRead(path);
+  EXPECT_TRUE(file.IsValid());
+  EXPECT_TRUE(file.ReadAtCurrentPos(buffer, image_size));
   delete[] buffer;
 }
 
@@ -2466,8 +2466,8 @@
   EXPECT_FALSE(GetFileSize(path, &size));
 
   // We should not be able to read the file.
-  int fd = OpenContentUriForRead(path);
-  EXPECT_EQ(-1, fd);
+  File file = OpenContentUriForRead(path);
+  EXPECT_FALSE(file.IsValid());
 }
 #endif