Commit 097a51d5 authored by brettw@chromium.org's avatar brettw@chromium.org

Remove file_util::ScopedFILE and use base version.

There is only one user of this class. The new implementation is in
base/files/scoped_file.h

R=viettrungluu@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288087 0039d316-1c4b-4281-b951-d872f2087c98
parent e6890ece
......@@ -410,28 +410,8 @@ BASE_EXPORT bool GetFileSystemType(const FilePath& path, FileSystemType* type);
BASE_EXPORT bool GetShmemTempDir(bool executable, FilePath* path);
#endif
} // namespace base
// -----------------------------------------------------------------------------
namespace file_util {
// Functor for |ScopedFILE| (below).
struct ScopedFILEClose {
inline void operator()(FILE* x) const {
if (x)
fclose(x);
}
};
// Automatically closes |FILE*|s.
typedef scoped_ptr<FILE, ScopedFILEClose> ScopedFILE;
} // namespace file_util
// Internal --------------------------------------------------------------------
namespace base {
namespace internal {
// Same as Move but allows paths with traversal components.
......
......@@ -504,7 +504,7 @@ bool IsPowerOfTwo(const T& val) {
// files. Returns false in case of errors reading the data.
bool ReadDbStateHelper(const base::FilePath& filename,
StateInternal* db_state) {
file_util::ScopedFILE file(base::OpenFile(filename, "rb"));
base::ScopedFILE file(base::OpenFile(filename, "rb"));
if (file.get() == NULL)
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment