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

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

Issue 417983002: [fsp] Add support for truncating files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. 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/truncate.h
diff --git a/chrome/browser/chromeos/file_system_provider/operations/create_file.h b/chrome/browser/chromeos/file_system_provider/operations/truncate.h
similarity index 81%
copy from chrome/browser/chromeos/file_system_provider/operations/create_file.h
copy to chrome/browser/chromeos/file_system_provider/operations/truncate.h
index 4c9af21d232bab14c89c467f04057c0cc8c526e2..52e59a1f773b009d9656f8e346d4a1523a70581b 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/create_file.h
+++ b/chrome/browser/chromeos/file_system_provider/operations/truncate.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_CREATE_FILE_H_
-#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_FILE_H_
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_TRUNCATE_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_TRUNCATE_H_
#include "base/files/file.h"
#include "base/memory/scoped_ptr.h"
@@ -27,13 +27,14 @@ namespace operations {
// Creates a file. If the file already exists, then the operation will fail with
// the FILE_ERROR_EXISTS error. Created per request.
-class CreateFile : public Operation {
+class Truncate : public Operation {
public:
- CreateFile(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- const base::FilePath& file_path,
- const fileapi::AsyncFileUtil::StatusCallback& callback);
- virtual ~CreateFile();
+ Truncate(extensions::EventRouter* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ const base::FilePath& file_path,
+ int64 length,
+ const fileapi::AsyncFileUtil::StatusCallback& callback);
+ virtual ~Truncate();
// Operation overrides.
virtual bool Execute(int request_id) OVERRIDE;
@@ -46,13 +47,14 @@ class CreateFile : public Operation {
private:
base::FilePath file_path_;
+ int64 length_;
const fileapi::AsyncFileUtil::StatusCallback callback_;
- DISALLOW_COPY_AND_ASSIGN(CreateFile);
+ DISALLOW_COPY_AND_ASSIGN(Truncate);
};
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_CREATE_FILE_H_
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_TRUNCATE_H_

Powered by Google App Engine
This is Rietveld 408576698