Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / media_galleries / fileapi / safe_audio_video_checker.h
index 5ce8dfb..94e611f 100644 (file)
@@ -7,9 +7,8 @@
 
 #include "base/basictypes.h"
 #include "base/callback_forward.h"
-#include "base/files/scoped_platform_file_closer.h"
+#include "base/files/file.h"
 #include "base/memory/weak_ptr.h"
-#include "base/platform_file.h"
 #include "content/public/browser/utility_process_host_client.h"
 #include "webkit/browser/fileapi/copy_or_move_file_validator.h"
 
@@ -26,7 +25,7 @@ class SafeAudioVideoChecker : public content::UtilityProcessHostClient {
  public:
   // Takes responsibility for closing |file|.
   SafeAudioVideoChecker(
-      const base::PlatformFile& file,
+      base::File file,
       const fileapi::CopyOrMoveFileValidator::ResultCallback& callback);
 
   // Must be called on the IO thread.
@@ -54,13 +53,7 @@ class SafeAudioVideoChecker : public content::UtilityProcessHostClient {
 
   State state_;
 
-  // This should be accessed through |file_closer_| to ensure it hasn't already
-  // been closed.
-  base::PlatformFile file_;
-
-  // Ensures that |file_| is closed if the utility process is not started for
-  // some reason.
-  base::ScopedPlatformFileCloser file_closer_;
+  base::File file_;
 
   const fileapi::CopyOrMoveFileValidator::ResultCallback callback_;