Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1015)

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/close_file.h

Issue 279213002: [fsp] Add support for closing files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/operations/close_file.h
diff --git a/chrome/browser/chromeos/file_system_provider/operations/open_file.h b/chrome/browser/chromeos/file_system_provider/operations/close_file.h
similarity index 75%
copy from chrome/browser/chromeos/file_system_provider/operations/open_file.h
copy to chrome/browser/chromeos/file_system_provider/operations/close_file.h
index efe0a53d1a8c5821cc49fedf90263c7f4d154a59..81502095df679325422b0206013d762605143a7e 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/open_file.h
+++ b/chrome/browser/chromeos/file_system_provider/operations/close_file.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPEN_FILE_H_
-#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPEN_FILE_H_
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_
#include "base/files/file.h"
#include "base/memory/scoped_ptr.h"
@@ -28,15 +28,13 @@ namespace operations {
// Opens a file for either read or write, with optionally creating the file
// first. Note, that this is part of fileapi::CreateOrOpen file, but it does
// not download the file locally. Created per request.
-class OpenFile : public Operation {
+class CloseFile : public Operation {
public:
- OpenFile(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- const base::FilePath& file_path,
- ProvidedFileSystemInterface::OpenFileMode mode,
- bool create,
- const fileapi::AsyncFileUtil::StatusCallback& callback);
- virtual ~OpenFile();
+ CloseFile(extensions::EventRouter* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ int open_request_id,
+ const fileapi::AsyncFileUtil::StatusCallback& callback);
+ virtual ~CloseFile();
// Operation overrides.
virtual bool Execute(int request_id) OVERRIDE;
@@ -46,16 +44,14 @@ class OpenFile : public Operation {
virtual void OnError(int request_id, base::File::Error error) OVERRIDE;
private:
- base::FilePath file_path_;
- ProvidedFileSystemInterface::OpenFileMode mode_;
- bool create_;
+ int open_request_id_;
const fileapi::AsyncFileUtil::StatusCallback callback_;
- DISALLOW_COPY_AND_ASSIGN(OpenFile);
+ DISALLOW_COPY_AND_ASSIGN(CloseFile);
};
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OPEN_FILE_H_
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_

Powered by Google App Engine
This is Rietveld 408576698