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

Unified Diff: webkit/browser/fileapi/sandbox_isolated_origin_database.h

Issue 16150002: Implement special origin database handling for Isolated Apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: webkit/browser/fileapi/sandbox_isolated_origin_database.h
diff --git a/webkit/browser/fileapi/sandbox_isolated_origin_database.h b/webkit/browser/fileapi/sandbox_isolated_origin_database.h
new file mode 100644
index 0000000000000000000000000000000000000000..c3d54d588065818a9b25612740e65ad38f172fd6
--- /dev/null
+++ b/webkit/browser/fileapi/sandbox_isolated_origin_database.h
@@ -0,0 +1,40 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_ISOLATED_ORIGIN_DATABASE_H_
+#define WEBKIT_BROWSER_FILEAPI_SANDBOX_ISOLATED_ORIGIN_DATABASE_H_
+
+#include "webkit/browser/fileapi/sandbox_origin_database_interface.h"
+
+namespace fileapi {
+
+class WEBKIT_STORAGE_EXPORT_PRIVATE SandboxIsolatedOriginDatabase
+ : public SandboxOriginDatabaseInterface {
+ public:
+ explicit SandboxIsolatedOriginDatabase(
+ const std::string& origin,
+ const base::FilePath& file_system_directory);
+ virtual ~SandboxIsolatedOriginDatabase();
+
+ // SandboxOriginDatabaseInterface overrides.
+ virtual bool HasOriginPath(const std::string& origin) OVERRIDE;
+ virtual bool GetPathForOrigin(const std::string& origin,
+ base::FilePath* directory) OVERRIDE;
+ virtual bool RemovePathForOrigin(const std::string& origin) OVERRIDE;
+ virtual bool ListAllOrigins(std::vector<OriginRecord>* origins) OVERRIDE;
+ virtual void DropDatabase() OVERRIDE;
+
+ private:
+ void MigrateDatabaseIfNeeded();
+
+ bool migration_checked_;
+ const std::string origin_;
+ const base::FilePath file_system_directory_;
+
+ DISALLOW_COPY_AND_ASSIGN(SandboxIsolatedOriginDatabase);
+};
+
+} // namespace fileapi
+
+#endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_ISOLATED_ORIGIN_DATABASE_H_
« no previous file with comments | « webkit/browser/fileapi/obfuscated_file_util.cc ('k') | webkit/browser/fileapi/sandbox_isolated_origin_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698