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

Unified Diff: chrome/browser/sync_file_system/local/canned_syncable_file_system.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: chrome/browser/sync_file_system/local/canned_syncable_file_system.h
diff --git a/chrome/browser/sync_file_system/local/canned_syncable_file_system.h b/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
index 7dc4906db909ba268191b3d026c2733119e79ced..7842753a92962c6648cf10bdb1ab7ffce2988730 100644
--- a/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
+++ b/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
@@ -14,20 +14,20 @@
#include "base/observer_list_threadsafe.h"
#include "chrome/browser/sync_file_system/local/local_file_sync_status.h"
#include "chrome/browser/sync_file_system/sync_status_code.h"
-#include "webkit/browser/blob/blob_data_handle.h"
-#include "webkit/browser/fileapi/file_system_operation.h"
-#include "webkit/browser/fileapi/file_system_url.h"
-#include "webkit/browser/quota/quota_callbacks.h"
-#include "webkit/common/fileapi/file_system_types.h"
-#include "webkit/common/fileapi/file_system_util.h"
-#include "webkit/common/quota/quota_types.h"
+#include "storage/browser/blob/blob_data_handle.h"
+#include "storage/browser/fileapi/file_system_operation.h"
+#include "storage/browser/fileapi/file_system_url.h"
+#include "storage/browser/quota/quota_callbacks.h"
+#include "storage/common/fileapi/file_system_types.h"
+#include "storage/common/fileapi/file_system_util.h"
+#include "storage/common/quota/quota_types.h"
namespace base {
class SingleThreadTaskRunner;
class Thread;
}
-namespace fileapi {
+namespace storage {
class FileSystemContext;
class FileSystemOperationRunner;
class FileSystemURL;
@@ -63,7 +63,7 @@ class CannedSyncableFileSystem
OpenFileSystemCallback;
typedef base::Callback<void(base::File::Error)> StatusCallback;
typedef base::Callback<void(int64)> WriteCallback;
- typedef fileapi::FileSystemOperation::FileEntryList FileEntryList;
+ typedef storage::FileSystemOperation::FileEntryList FileEntryList;
enum QuotaMode {
QUOTA_ENABLED,
@@ -83,7 +83,7 @@ class CannedSyncableFileSystem
void TearDown();
// Creates a FileSystemURL for the given (utf8) path string.
- fileapi::FileSystemURL URL(const std::string& path) const;
+ storage::FileSystemURL URL(const std::string& path) const;
// Initialize this with given |sync_context| if it hasn't
// been initialized.
@@ -100,12 +100,12 @@ class CannedSyncableFileSystem
void RemoveSyncStatusObserver(LocalFileSyncStatus::Observer* observer);
// Accessors.
- fileapi::FileSystemContext* file_system_context() {
+ storage::FileSystemContext* file_system_context() {
return file_system_context_.get();
}
quota::QuotaManager* quota_manager() { return quota_manager_.get(); }
GURL origin() const { return origin_; }
- fileapi::FileSystemType type() const { return type_; }
+ storage::FileSystemType type() const { return type_; }
quota::StorageType storage_type() const {
return FileSystemTypeToQuotaStorageType(type_);
}
@@ -114,34 +114,33 @@ class CannedSyncableFileSystem
// OpenFileSystem() must have been called before calling any of them.
// They create an operation and run it on IO task runner, and the operation
// posts a task on file runner.
- base::File::Error CreateDirectory(const fileapi::FileSystemURL& url);
- base::File::Error CreateFile(const fileapi::FileSystemURL& url);
- base::File::Error Copy(const fileapi::FileSystemURL& src_url,
- const fileapi::FileSystemURL& dest_url);
- base::File::Error Move(const fileapi::FileSystemURL& src_url,
- const fileapi::FileSystemURL& dest_url);
- base::File::Error TruncateFile(const fileapi::FileSystemURL& url,
- int64 size);
- base::File::Error TouchFile(const fileapi::FileSystemURL& url,
+ base::File::Error CreateDirectory(const storage::FileSystemURL& url);
+ base::File::Error CreateFile(const storage::FileSystemURL& url);
+ base::File::Error Copy(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url);
+ base::File::Error Move(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url);
+ base::File::Error TruncateFile(const storage::FileSystemURL& url, int64 size);
+ base::File::Error TouchFile(const storage::FileSystemURL& url,
const base::Time& last_access_time,
const base::Time& last_modified_time);
- base::File::Error Remove(const fileapi::FileSystemURL& url, bool recursive);
- base::File::Error FileExists(const fileapi::FileSystemURL& url);
- base::File::Error DirectoryExists(const fileapi::FileSystemURL& url);
- base::File::Error VerifyFile(const fileapi::FileSystemURL& url,
+ base::File::Error Remove(const storage::FileSystemURL& url, bool recursive);
+ base::File::Error FileExists(const storage::FileSystemURL& url);
+ base::File::Error DirectoryExists(const storage::FileSystemURL& url);
+ base::File::Error VerifyFile(const storage::FileSystemURL& url,
const std::string& expected_data);
base::File::Error GetMetadataAndPlatformPath(
- const fileapi::FileSystemURL& url,
+ const storage::FileSystemURL& url,
base::File::Info* info,
base::FilePath* platform_path);
- base::File::Error ReadDirectory(const fileapi::FileSystemURL& url,
+ base::File::Error ReadDirectory(const storage::FileSystemURL& url,
FileEntryList* entries);
// Returns the # of bytes written (>=0) or an error code (<0).
int64 Write(net::URLRequestContext* url_request_context,
- const fileapi::FileSystemURL& url,
- scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle);
- int64 WriteString(const fileapi::FileSystemURL& url, const std::string& data);
+ const storage::FileSystemURL& url,
+ scoped_ptr<storage::BlobDataHandle> blob_data_handle);
+ int64 WriteString(const storage::FileSystemURL& url, const std::string& data);
// Purges the file system local storage.
base::File::Error DeleteFileSystem();
@@ -150,60 +149,60 @@ class CannedSyncableFileSystem
quota::QuotaStatusCode GetUsageAndQuota(int64* usage, int64* quota);
// ChangeTracker related methods. They run on file task runner.
- void GetChangedURLsInTracker(fileapi::FileSystemURLSet* urls);
- void ClearChangeForURLInTracker(const fileapi::FileSystemURL& url);
- void GetChangesForURLInTracker(const fileapi::FileSystemURL& url,
+ void GetChangedURLsInTracker(storage::FileSystemURLSet* urls);
+ void ClearChangeForURLInTracker(const storage::FileSystemURL& url);
+ void GetChangesForURLInTracker(const storage::FileSystemURL& url,
FileChangeList* changes);
SyncFileSystemBackend* backend();
- fileapi::FileSystemOperationRunner* operation_runner();
+ storage::FileSystemOperationRunner* operation_runner();
// LocalFileSyncStatus::Observer overrides.
- virtual void OnSyncEnabled(const fileapi::FileSystemURL& url) OVERRIDE;
- virtual void OnWriteEnabled(const fileapi::FileSystemURL& url) OVERRIDE;
+ virtual void OnSyncEnabled(const storage::FileSystemURL& url) OVERRIDE;
+ virtual void OnWriteEnabled(const storage::FileSystemURL& url) OVERRIDE;
// Operation methods body.
// They can be also called directly if the caller is already on IO thread.
void DoOpenFileSystem(const OpenFileSystemCallback& callback);
- void DoCreateDirectory(const fileapi::FileSystemURL& url,
+ void DoCreateDirectory(const storage::FileSystemURL& url,
const StatusCallback& callback);
- void DoCreateFile(const fileapi::FileSystemURL& url,
+ void DoCreateFile(const storage::FileSystemURL& url,
const StatusCallback& callback);
- void DoCopy(const fileapi::FileSystemURL& src_url,
- const fileapi::FileSystemURL& dest_url,
+ void DoCopy(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url,
const StatusCallback& callback);
- void DoMove(const fileapi::FileSystemURL& src_url,
- const fileapi::FileSystemURL& dest_url,
+ void DoMove(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url,
const StatusCallback& callback);
- void DoTruncateFile(const fileapi::FileSystemURL& url,
+ void DoTruncateFile(const storage::FileSystemURL& url,
int64 size,
const StatusCallback& callback);
- void DoTouchFile(const fileapi::FileSystemURL& url,
+ void DoTouchFile(const storage::FileSystemURL& url,
const base::Time& last_access_time,
const base::Time& last_modified_time,
const StatusCallback& callback);
- void DoRemove(const fileapi::FileSystemURL& url,
+ void DoRemove(const storage::FileSystemURL& url,
bool recursive,
const StatusCallback& callback);
- void DoFileExists(const fileapi::FileSystemURL& url,
+ void DoFileExists(const storage::FileSystemURL& url,
const StatusCallback& callback);
- void DoDirectoryExists(const fileapi::FileSystemURL& url,
+ void DoDirectoryExists(const storage::FileSystemURL& url,
const StatusCallback& callback);
- void DoVerifyFile(const fileapi::FileSystemURL& url,
+ void DoVerifyFile(const storage::FileSystemURL& url,
const std::string& expected_data,
const StatusCallback& callback);
- void DoGetMetadataAndPlatformPath(const fileapi::FileSystemURL& url,
+ void DoGetMetadataAndPlatformPath(const storage::FileSystemURL& url,
base::File::Info* info,
base::FilePath* platform_path,
const StatusCallback& callback);
- void DoReadDirectory(const fileapi::FileSystemURL& url,
+ void DoReadDirectory(const storage::FileSystemURL& url,
FileEntryList* entries,
const StatusCallback& callback);
void DoWrite(net::URLRequestContext* url_request_context,
- const fileapi::FileSystemURL& url,
- scoped_ptr<webkit_blob::BlobDataHandle> blob_data_handle,
+ const storage::FileSystemURL& url,
+ scoped_ptr<storage::BlobDataHandle> blob_data_handle,
const WriteCallback& callback);
- void DoWriteString(const fileapi::FileSystemURL& url,
+ void DoWriteString(const storage::FileSystemURL& url,
const std::string& data,
const WriteCallback& callback);
void DoGetUsageAndQuota(int64* usage,
@@ -228,9 +227,9 @@ class CannedSyncableFileSystem
const std::string service_name_;
scoped_refptr<quota::QuotaManager> quota_manager_;
- scoped_refptr<fileapi::FileSystemContext> file_system_context_;
+ scoped_refptr<storage::FileSystemContext> file_system_context_;
const GURL origin_;
- const fileapi::FileSystemType type_;
+ const storage::FileSystemType type_;
GURL root_url_;
base::File::Error result_;
sync_file_system::SyncStatusCode sync_status_;

Powered by Google App Engine
This is Rietveld 408576698