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

Unified Diff: chrome/browser/sync_file_system/drive/metadata_db_migration_util.h

Issue 15951007: SyncFS: Factor out DriveMetadataDB migration functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win test 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
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive/metadata_db_migration_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive/metadata_db_migration_util.h
diff --git a/chrome/browser/sync_file_system/drive/metadata_db_migration_util.h b/chrome/browser/sync_file_system/drive/metadata_db_migration_util.h
index 2a851c5810b457184d3948b98c7d2ccfb0c5c6ba..62f5a6d3ede92e7915914a3614c4135f17a33367 100644
--- a/chrome/browser/sync_file_system/drive/metadata_db_migration_util.h
+++ b/chrome/browser/sync_file_system/drive/metadata_db_migration_util.h
@@ -11,9 +11,28 @@
#include "third_party/leveldatabase/src/include/leveldb/db.h"
#include "webkit/browser/fileapi/syncable/sync_status_code.h"
+class GURL;
+
namespace sync_file_system {
namespace drive {
+// Parses a filesystem URL which contains 'drive' as a service name
+// (a.k.a. V0-format filesystem URL).
+//
+// When you parse V0-format filesystem URL, you should use this function instead
+// of DeserializeSyncableFileSystemURL() since 'drive' service name is no longer
+// used and the deserializer cannot parse the unregistered service name.
+//
+// EXAMPLE:
+// Assume following argument is given.
+// url: 'filesystem:http://www.example.com/external/drive/foo/bar'
+// returns
+// origin: 'http://www.example.com/'
+// path: 'foo/bar'
+bool ParseV0FormatFileSystemURL(const GURL& url,
+ GURL* origin,
+ base::FilePath* path);
+
// Adds "file:" prefix to WAPI resource ID.
// EXAMPLE: "xxx" => "file:xxx"
std::string AddWapiFilePrefix(const std::string& resource_id);
@@ -33,7 +52,10 @@ std::string AddWapiIdPrefix(const std::string& resource_id,
// "zzz" => "zzz"
std::string RemoveWapiIdPrefix(const std::string& resource_id);
-// Migrate |db| scheme from version 1 to version 2.
+// Migrate |db| schema from version 0 to version 1.
+SyncStatusCode MigrateDatabaseFromV0ToV1(leveldb::DB* db);
+
+// Migrate |db| schema from version 1 to version 2.
SyncStatusCode MigrateDatabaseFromV1ToV2(leveldb::DB* db);
} // namespace drive
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive/metadata_db_migration_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698