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

Unified Diff: chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc

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/chromeos/drive/fileapi/fileapi_worker.cc
diff --git a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc
index 29657e07b21c91775acb402f47f072c37f300323..8e23088a1ad0544f5de4c3c7f238b56e10a363a0 100644
--- a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc
+++ b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc
@@ -14,13 +14,13 @@
#include "chrome/browser/chromeos/drive/file_system_util.h"
#include "chrome/browser/chromeos/drive/resource_entry_conversion.h"
#include "content/public/browser/browser_thread.h"
-#include "webkit/browser/fileapi/file_system_url.h"
-#include "webkit/common/fileapi/directory_entry.h"
+#include "storage/browser/fileapi/file_system_url.h"
+#include "storage/common/fileapi/directory_entry.h"
using content::BrowserThread;
namespace drive {
-namespace fileapi_internal {
+namespace storage_internal {
namespace {
// The summary of opening mode is:
@@ -71,12 +71,12 @@ void RunReadDirectoryCallbackWithEntries(
scoped_ptr<ResourceEntryVector> resource_entries) {
DCHECK(resource_entries);
- std::vector<fileapi::DirectoryEntry> entries;
+ std::vector<storage::DirectoryEntry> entries;
// Convert drive files to File API's directory entry.
entries.reserve(resource_entries->size());
for (size_t i = 0; i < resource_entries->size(); ++i) {
const ResourceEntry& resource_entry = (*resource_entries)[i];
- fileapi::DirectoryEntry entry;
+ storage::DirectoryEntry entry;
entry.name = resource_entry.base_name();
const PlatformFileInfoProto& file_info = resource_entry.file_info();
@@ -94,7 +94,8 @@ void RunReadDirectoryCallbackWithEntries(
void RunReadDirectoryCallbackOnCompletion(const ReadDirectoryCallback& callback,
FileError error) {
callback.Run(FileErrorToBaseFileError(error),
- std::vector<fileapi::DirectoryEntry>(), false /*has_more*/);
+ std::vector<storage::DirectoryEntry>(),
+ false /*has_more*/);
}
// Runs |callback| with arguments based on |error|, |local_path| and |entry|.
@@ -103,10 +104,10 @@ void RunCreateSnapshotFileCallback(const CreateSnapshotFileCallback& callback,
const base::FilePath& local_path,
scoped_ptr<ResourceEntry> entry) {
if (error != FILE_ERROR_OK) {
- callback.Run(
- FileErrorToBaseFileError(error),
- base::File::Info(), base::FilePath(),
- webkit_blob::ScopedFile::ScopeOutPolicy());
+ callback.Run(FileErrorToBaseFileError(error),
+ base::File::Info(),
+ base::FilePath(),
+ storage::ScopedFile::ScopeOutPolicy());
return;
}
@@ -125,10 +126,10 @@ void RunCreateSnapshotFileCallback(const CreateSnapshotFileCallback& callback,
// If the file is a hosted document, a temporary JSON file is created to
// represent the document. The JSON file is not cached and its lifetime
// is managed by ShareableFileReference.
- webkit_blob::ScopedFile::ScopeOutPolicy scope_out_policy =
- entry->file_specific_info().is_hosted_document() ?
- webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT :
- webkit_blob::ScopedFile::DONT_DELETE_ON_SCOPE_OUT;
+ storage::ScopedFile::ScopeOutPolicy scope_out_policy =
+ entry->file_specific_info().is_hosted_document()
+ ? storage::ScopedFile::DELETE_ON_SCOPE_OUT
+ : storage::ScopedFile::DONT_DELETE_ON_SCOPE_OUT;
callback.Run(base::File::FILE_OK, file_info, local_path, scope_out_policy);
}
@@ -192,7 +193,7 @@ void OpenFileAfterFileSystemOpenFile(int file_flags,
} // namespace
-FileSystemInterface* GetFileSystemFromUrl(const fileapi::FileSystemURL& url) {
+FileSystemInterface* GetFileSystemFromUrl(const storage::FileSystemURL& url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
Profile* profile = util::ExtractProfileFromPath(url.path());
@@ -364,5 +365,5 @@ void TouchFile(const base::FilePath& file_path,
}
-} // namespace fileapi_internal
+} // namespace storage_internal
} // namespace drive

Powered by Google App Engine
This is Rietveld 408576698