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

Unified Diff: storage/browser/fileapi/copy_or_move_operation_delegate.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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: storage/browser/fileapi/copy_or_move_operation_delegate.h
diff --git a/webkit/browser/fileapi/copy_or_move_operation_delegate.h b/storage/browser/fileapi/copy_or_move_operation_delegate.h
similarity index 79%
rename from webkit/browser/fileapi/copy_or_move_operation_delegate.h
rename to storage/browser/fileapi/copy_or_move_operation_delegate.h
index bb0c1f96ebce02dc361d6828f8a723c21a8be2ae..0bd7a79e8fe72888493074029f145619b8ba5707 100644
--- a/webkit/browser/fileapi/copy_or_move_operation_delegate.h
+++ b/storage/browser/fileapi/copy_or_move_operation_delegate.h
@@ -11,42 +11,38 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
-#include "webkit/browser/fileapi/recursive_operation_delegate.h"
+#include "storage/browser/fileapi/recursive_operation_delegate.h"
namespace net {
class DrainableIOBuffer;
class IOBufferWithSize;
}
-namespace webkit_blob {
+namespace storage {
class FileStreamReader;
class ShareableFileReference;
}
-namespace fileapi {
+namespace storage {
class CopyOrMoveFileValidator;
class FileStreamWriter;
// A delegate class for recursive copy or move operations.
-class CopyOrMoveOperationDelegate
- : public RecursiveOperationDelegate {
+class CopyOrMoveOperationDelegate : public RecursiveOperationDelegate {
public:
class CopyOrMoveImpl;
typedef FileSystemOperation::CopyProgressCallback CopyProgressCallback;
typedef FileSystemOperation::CopyOrMoveOption CopyOrMoveOption;
- enum OperationType {
- OPERATION_COPY,
- OPERATION_MOVE
- };
+ enum OperationType { OPERATION_COPY, OPERATION_MOVE };
// Helper to copy a file by reader and writer streams.
// Export for testing.
- class WEBKIT_STORAGE_BROWSER_EXPORT StreamCopyHelper {
+ class STORAGE_EXPORT StreamCopyHelper {
public:
StreamCopyHelper(
- scoped_ptr<webkit_blob::FileStreamReader> reader,
+ scoped_ptr<storage::FileStreamReader> reader,
scoped_ptr<FileStreamWriter> writer,
bool need_flush,
int buffer_size,
@@ -70,13 +66,14 @@ class CopyOrMoveOperationDelegate
void Write(const StatusCallback& callback,
scoped_refptr<net::DrainableIOBuffer> buffer);
void DidWrite(const StatusCallback& callback,
- scoped_refptr<net::DrainableIOBuffer> buffer, int result);
+ scoped_refptr<net::DrainableIOBuffer> buffer,
+ int result);
// Flushes the written content in |writer_|.
void Flush(const StatusCallback& callback, bool is_eof);
void DidFlush(const StatusCallback& callback, bool is_eof, int result);
- scoped_ptr<webkit_blob::FileStreamReader> reader_;
+ scoped_ptr<storage::FileStreamReader> reader_;
scoped_ptr<FileStreamWriter> writer_;
const bool need_flush_;
FileSystemOperation::CopyFileProgressCallback file_progress_callback_;
@@ -90,14 +87,13 @@ class CopyOrMoveOperationDelegate
DISALLOW_COPY_AND_ASSIGN(StreamCopyHelper);
};
- CopyOrMoveOperationDelegate(
- FileSystemContext* file_system_context,
- const FileSystemURL& src_root,
- const FileSystemURL& dest_root,
- OperationType operation_type,
- CopyOrMoveOption option,
- const CopyProgressCallback& progress_callback,
- const StatusCallback& callback);
+ CopyOrMoveOperationDelegate(FileSystemContext* file_system_context,
+ const FileSystemURL& src_root,
+ const FileSystemURL& dest_root,
+ OperationType operation_type,
+ CopyOrMoveOption option,
+ const CopyProgressCallback& progress_callback,
+ const StatusCallback& callback);
virtual ~CopyOrMoveOperationDelegate();
// RecursiveOperationDelegate overrides:
@@ -110,7 +106,6 @@ class CopyOrMoveOperationDelegate
virtual void PostProcessDirectory(const FileSystemURL& url,
const StatusCallback& callback) OVERRIDE;
-
protected:
virtual void OnCancel() OVERRIDE;
@@ -129,11 +124,10 @@ class CopyOrMoveOperationDelegate
const FileSystemURL& dest_url,
const StatusCallback& callback,
base::File::Error error);
- void PostProcessDirectoryAfterGetMetadata(
- const FileSystemURL& src_url,
- const StatusCallback& callback,
- base::File::Error error,
- const base::File::Info& file_info);
+ void PostProcessDirectoryAfterGetMetadata(const FileSystemURL& src_url,
+ const StatusCallback& callback,
+ base::File::Error error,
+ const base::File::Info& file_info);
void PostProcessDirectoryAfterTouchFile(const FileSystemURL& src_url,
const StatusCallback& callback,
base::File::Error error);
@@ -157,6 +151,6 @@ class CopyOrMoveOperationDelegate
DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_
« no previous file with comments | « storage/browser/fileapi/copy_or_move_file_validator.h ('k') | storage/browser/fileapi/copy_or_move_operation_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698