diff options
author | rvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-07 00:02:22 +0000 |
---|---|---|
committer | rvargas@chromium.org <rvargas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-07 00:02:22 +0000 |
commit | 77a595ece63c7b0e6e1473a078372b4dc661b61e (patch) | |
tree | 8e330500123da7998cbcb3d9e61d615a3efa09c4 /dbus | |
parent | e05aea42683902dbbc8603a1ca964b56416da3fe (diff) | |
download | chromium_src-77a595ece63c7b0e6e1473a078372b4dc661b61e.zip chromium_src-77a595ece63c7b0e6e1473a078372b4dc661b61e.tar.gz chromium_src-77a595ece63c7b0e6e1473a078372b4dc661b61e.tar.bz2 |
Remove PlatformFile from dbus/file_descriptor
BUG=322664
Review URL: https://codereview.chromium.org/307423005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/file_descriptor.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/dbus/file_descriptor.cc b/dbus/file_descriptor.cc index 91b089f..d2d6a31 100644 --- a/dbus/file_descriptor.cc +++ b/dbus/file_descriptor.cc @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/files/file.h" #include "base/logging.h" -#include "base/platform_file.h" #include "dbus/file_descriptor.h" namespace dbus { FileDescriptor::~FileDescriptor() { if (owner_) - base::ClosePlatformFile(value_); + base::File auto_closer(value_); } int FileDescriptor::value() const { @@ -25,8 +25,10 @@ int FileDescriptor::TakeValue() { } void FileDescriptor::CheckValidity() { - base::PlatformFileInfo info; - bool ok = base::GetPlatformFileInfo(value_, &info); + base::File file(value_); + base::File::Info info; + bool ok = file.GetInfo(&info); + file.TakePlatformFile(); // Prevent |value_| from being closed by |file|. valid_ = (ok && !info.is_directory); } |