Use base::File for the OpenResourceCallback's argument.

ManifestServiceChannel can be removed while the DownloadFile is running.
In such a case, ManifestServiceProxy::DidDownloadFile is called upon
the completion of DownloadFile, and then callback is invoked.
However, as the callback refers the ManifestServiceChannel weakly, so
the native file descriptor will be leaked.
By this change, OpenResourceCallback takes the base::File instead of
base::PlatformFile. Since base::File will take the ownership of the
native file descriptor, it will be closed correctly, even if the
ManifestServiceChannel is deleted before.

BUG=239656
TEST=Ran browser_tests --gtest_filter=*NonSfi*:*NonSFI* locally and trybots.
CQ_EXTRA_TRYBOTS=tryserver.chromium:linux_rel_precise32

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

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