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

Unified Diff: storage/browser/fileapi/sandbox_directory_database.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/sandbox_directory_database.h
diff --git a/webkit/browser/fileapi/sandbox_directory_database.h b/storage/browser/fileapi/sandbox_directory_database.h
similarity index 83%
rename from webkit/browser/fileapi/sandbox_directory_database.h
rename to storage/browser/fileapi/sandbox_directory_database.h
index 114af1ba9fdcd3e1275d538b3b7bb4c086bff9cb..6ebb0e4d845357586d2d1d261398f486674a2663 100644
--- a/webkit/browser/fileapi/sandbox_directory_database.h
+++ b/storage/browser/fileapi/sandbox_directory_database.h
@@ -12,7 +12,7 @@
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
-#include "webkit/browser/webkit_storage_browser_export.h"
+#include "storage/common/storage_export.h"
namespace content {
class SandboxDirectoryDatabaseTest;
@@ -29,7 +29,7 @@ class Status;
class WriteBatch;
}
-namespace fileapi {
+namespace storage {
// This class WILL NOT protect you against producing directory loops, giving an
// empty directory a backing data file, giving two files the same backing file,
@@ -40,17 +40,15 @@ namespace fileapi {
// TODO(ericu): Safe mode, which does more checks such as the above on debug
// builds.
// TODO(ericu): Add a method that will give a unique filename for a data file.
-class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
+class STORAGE_EXPORT_PRIVATE SandboxDirectoryDatabase {
public:
typedef int64 FileId;
- struct WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE FileInfo {
+ struct STORAGE_EXPORT_PRIVATE FileInfo {
FileInfo();
~FileInfo();
- bool is_directory() const {
- return data_path.empty();
- }
+ bool is_directory() const { return data_path.empty(); }
FileId parent_id;
base::FilePath data_path;
@@ -61,15 +59,13 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
base::Time modification_time;
};
- SandboxDirectoryDatabase(
- const base::FilePath& filesystem_data_directory,
- leveldb::Env* env_override);
+ SandboxDirectoryDatabase(const base::FilePath& filesystem_data_directory,
+ leveldb::Env* env_override);
~SandboxDirectoryDatabase();
- bool GetChildWithName(
- FileId parent_id,
- const base::FilePath::StringType& name,
- FileId* child_id);
+ bool GetChildWithName(FileId parent_id,
+ const base::FilePath::StringType& name,
+ FileId* child_id);
bool GetFileWithPath(const base::FilePath& path, FileId* file_id);
// ListChildren will succeed, returning 0 children, if parent_id doesn't
// exist.
@@ -81,8 +77,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
// and renames. If you just want to update the modification_time, use
// UpdateModificationTime.
bool UpdateFileInfo(FileId file_id, const FileInfo& info);
- bool UpdateModificationTime(
- FileId file_id, const base::Time& modification_time);
+ bool UpdateModificationTime(FileId file_id,
+ const base::Time& modification_time);
// This is used for an overwriting move of a file [not a directory] on top of
// another file [also not a directory]; we need to alter two files' info in a
// single transaction to avoid weird backing file references in the event of a
@@ -117,8 +113,9 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
void ReportInitStatus(const leveldb::Status& status);
bool StoreDefaultValues();
bool GetLastFileId(FileId* file_id);
- bool AddFileInfoHelper(
- const FileInfo& info, FileId file_id, leveldb::WriteBatch* batch);
+ bool AddFileInfoHelper(const FileInfo& info,
+ FileId file_id,
+ leveldb::WriteBatch* batch);
bool RemoveFileInfoHelper(FileId file_id, leveldb::WriteBatch* batch);
void HandleError(const tracked_objects::Location& from_here,
const leveldb::Status& status);
@@ -130,6 +127,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase);
};
-} // namespace fileapi
+} // namespace storage
#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_
« no previous file with comments | « storage/browser/fileapi/remove_operation_delegate.cc ('k') | storage/browser/fileapi/sandbox_directory_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698