SyncFS: Convert WAPI ResourceID to DriveAPI FileID
To migrate SyncFS from WAPI to DriveAPI, this change adds utility functions to convert from/to WAPI ResourceID to/from DriveAPI FileID as below, and replaces WAPI ResourceIDs stored in DriveMetadataDB with DriveAPI FileIDs using DB migration mechanism (DB schema version: 1 -> 2). (WAPI) "file:xxxx" <=> "xxxx" (DriveAPI) (WAPI) "folder:yyyy" <=> "yyyy" (DriveAPI) When using WAPI (i.e. IsDriveAPIEnabled() returns false), DriveMetadataDB passes ResourceIDs re-converted from FileIDs to DriveMetadataStore so that the SyncFS can use migrated DB contents on WAPI. BUG=234557 TEST=unit_tests --gtest_filter=\*DriveMetadataDBMigrationUtilTest\* Review URL: https://chromiumcodereview.appspot.com/15808002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202858 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment