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

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

Issue 384303002: [fsp] Add support for copying files within a provided file system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 5 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/copy_entry.h
diff --git a/chrome/browser/chromeos/file_system_provider/operations/close_file.h b/chrome/browser/chromeos/file_system_provider/operations/copy_entry.h
similarity index 78%
copy from chrome/browser/chromeos/file_system_provider/operations/close_file.h
copy to chrome/browser/chromeos/file_system_provider/operations/copy_entry.h
index 83bafff2f5ef3a5af85008ff6fb3fca78a3a030e..b25a640c2871de033eaa9836ba3b2b9a2438932b 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/close_file.h
+++ b/chrome/browser/chromeos/file_system_provider/operations/copy_entry.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_CLOSE_FILE_H_
-#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_COPY_ENTRY_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_COPY_ENTRY_H_
#include "base/files/file.h"
#include "base/memory/scoped_ptr.h"
@@ -25,16 +25,15 @@ namespace chromeos {
namespace file_system_provider {
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 CloseFile : public Operation {
+// Copies an entry (recursively if a directory). Created per request.
+class CopyEntry : public Operation {
public:
- CloseFile(extensions::EventRouter* event_router,
+ CopyEntry(extensions::EventRouter* event_router,
const ProvidedFileSystemInfo& file_system_info,
- int open_request_id,
+ const base::FilePath& source_path,
+ const base::FilePath& target_path,
const fileapi::AsyncFileUtil::StatusCallback& callback);
- virtual ~CloseFile();
+ virtual ~CopyEntry();
// Operation overrides.
virtual bool Execute(int request_id) OVERRIDE;
@@ -46,14 +45,15 @@ class CloseFile : public Operation {
base::File::Error error) OVERRIDE;
private:
- int open_request_id_;
+ base::FilePath source_path_;
+ base::FilePath target_path_;
const fileapi::AsyncFileUtil::StatusCallback callback_;
- DISALLOW_COPY_AND_ASSIGN(CloseFile);
+ DISALLOW_COPY_AND_ASSIGN(CopyEntry);
};
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CLOSE_FILE_H_
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_COPY_ENTRY_H_

Powered by Google App Engine
This is Rietveld 408576698