Remove base/platform_file.*
Fix remaining users of platform_file.h
BUG=322664
R=brettw@chromium.org
TBR=thestig@chromium.org, satorux@chromium.org, jochen@chromium.org, rockot@chromium.org, viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/326383005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279330 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: aefeb011b33eeded5c59bb6e2e08b7612a2666d7
diff --git a/base/files/file.cc b/base/files/file.cc
index bfe87bd..ea8dbf2 100644
--- a/base/files/file.cc
+++ b/base/files/file.cc
@@ -3,9 +3,7 @@
// found in the LICENSE file.
#include "base/files/file.h"
-
-// TODO(rvargas): remove this (needed for kInvalidPlatformFileValue).
-#include "base/platform_file.h"
+#include "base/files/file_path.h"
namespace base {
@@ -19,16 +17,14 @@
}
File::File()
- : file_(kInvalidPlatformFileValue),
- error_details_(FILE_ERROR_FAILED),
+ : error_details_(FILE_ERROR_FAILED),
created_(false),
async_(false) {
}
#if !defined(OS_NACL)
File::File(const FilePath& name, uint32 flags)
- : file_(kInvalidPlatformFileValue),
- error_details_(FILE_OK),
+ : error_details_(FILE_OK),
created_(false),
async_(false) {
Initialize(name, flags);
@@ -46,8 +42,7 @@
}
File::File(Error error_details)
- : file_(kInvalidPlatformFileValue),
- error_details_(error_details),
+ : error_details_(error_details),
created_(false),
async_(false) {
}
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index a51aaa8..43684b5 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -12,8 +12,6 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/metrics/sparse_histogram.h"
-// TODO(rvargas): remove this (needed for kInvalidPlatformFileValue).
-#include "base/platform_file.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
diff --git a/base/files/scoped_platform_file_closer.cc b/base/files/scoped_platform_file_closer.cc
deleted file mode 100644
index 44f6752..0000000
--- a/base/files/scoped_platform_file_closer.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/files/scoped_platform_file_closer.h"
-
-namespace base {
-namespace internal {
-
-void PlatformFileCloser::operator()(PlatformFile* file) const {
- if (file && *file != kInvalidPlatformFileValue)
- ClosePlatformFile(*file);
-}
-
-} // namespace internal
-} // namespace base
diff --git a/base/files/scoped_platform_file_closer.h b/base/files/scoped_platform_file_closer.h
deleted file mode 100644
index 8fe4a28..0000000
--- a/base/files/scoped_platform_file_closer.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_FILES_SCOPED_PLATFORM_FILE_CLOSER_H_
-#define BASE_FILES_SCOPED_PLATFORM_FILE_CLOSER_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "base/platform_file.h"
-
-namespace base {
-
-namespace internal {
-
-struct BASE_EXPORT PlatformFileCloser {
- void operator()(PlatformFile* file) const;
-};
-
-} // namespace internal
-
-typedef scoped_ptr<PlatformFile, internal::PlatformFileCloser>
- ScopedPlatformFileCloser;
-
-} // namespace base
-
-#endif // BASE_FILES_SCOPED_PLATFORM_FILE_CLOSER_H_