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

Unified Diff: chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 6 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/sync_file_system/drive_backend/metadata_db_migration_util.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc
index deafbea36e52984804a5cd58ed477214cb2352e6..df45a5455c5d574b443ebb93136d5fdf792cf272 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_db_migration_util.cc
@@ -46,24 +46,34 @@ SyncStatusCode MigrateDatabaseFromV4ToV3(leveldb::DB* db) {
std::string key = itr->key().ToString();
// Do nothing for valid entries in both versions.
- if (base::StartsWithASCII(key, kServiceMetadataKey, true) ||
- base::StartsWithASCII(key, kFileMetadataKeyPrefix, true) ||
- base::StartsWithASCII(key, kFileTrackerKeyPrefix, true)) {
+ if (base::StartsWith(key, kServiceMetadataKey,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kFileMetadataKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kFileTrackerKeyPrefix,
+ base::CompareCase::SENSITIVE)) {
continue;
}
// Drop entries used in version 4 only.
- if (base::StartsWithASCII(key, kAppRootIDByAppIDKeyPrefix, true) ||
- base::StartsWithASCII(key, kActiveTrackerIDByFileIDKeyPrefix, true) ||
- base::StartsWithASCII(key, kTrackerIDByFileIDKeyPrefix, true) ||
- base::StartsWithASCII(key, kMultiTrackerByFileIDKeyPrefix, true) ||
- base::StartsWithASCII(key, kActiveTrackerIDByParentAndTitleKeyPrefix,
- true) ||
- base::StartsWithASCII(key, kTrackerIDByParentAndTitleKeyPrefix, true) ||
- base::StartsWithASCII(key, kMultiBackingParentAndTitleKeyPrefix,
- true) ||
- base::StartsWithASCII(key, kDirtyIDKeyPrefix, true) ||
- base::StartsWithASCII(key, kDemotedDirtyIDKeyPrefix, true)) {
+ if (base::StartsWith(key, kAppRootIDByAppIDKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kActiveTrackerIDByFileIDKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kTrackerIDByFileIDKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kMultiTrackerByFileIDKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kActiveTrackerIDByParentAndTitleKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kTrackerIDByParentAndTitleKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kMultiBackingParentAndTitleKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kDirtyIDKeyPrefix,
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(key, kDemotedDirtyIDKeyPrefix,
+ base::CompareCase::SENSITIVE)) {
write_batch.Delete(key);
continue;
}

Powered by Google App Engine
This is Rietveld 408576698