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

Unified Diff: chrome/browser/chromeos/drive/resource_metadata_storage.cc

Issue 445473002: Remove ResourceIdCanonicalizer from DriveServiceInterface (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: chrome/browser/chromeos/drive/resource_metadata_storage.cc
diff --git a/chrome/browser/chromeos/drive/resource_metadata_storage.cc b/chrome/browser/chromeos/drive/resource_metadata_storage.cc
index 5453ee3852d6a7906901b33e06db54401cf4dac1..5b7642a03c93b2e9fa77a545452400c05757a3e7 100644
--- a/chrome/browser/chromeos/drive/resource_metadata_storage.cc
+++ b/chrome/browser/chromeos/drive/resource_metadata_storage.cc
@@ -13,6 +13,7 @@
#include "base/sequenced_task_runner.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/chromeos/drive/drive.pb.h"
+#include "chrome/browser/drive/drive_api_util.h"
#include "third_party/leveldatabase/env_chromium.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
#include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
@@ -216,8 +217,7 @@ bool ResourceMetadataStorage::Iterator::HasError() const {
// static
bool ResourceMetadataStorage::UpgradeOldDB(
- const base::FilePath& directory_path,
- const ResourceIdCanonicalizer& id_canonicalizer) {
+ const base::FilePath& directory_path) {
base::ThreadRestrictions::AssertIOAllowed();
COMPILE_ASSERT(
kDBVersion == 13,
@@ -309,7 +309,7 @@ bool ResourceMetadataStorage::UpgradeOldDB(
// The resource ID might be in old WAPI format. We need to canonicalize
// to the format of API service currently in use.
const std::string& id = GetIdFromCacheEntryKey(it->key());
- const std::string& id_new = id_canonicalizer.Run(id);
+ const std::string& id_new = util::CanonicalizeResourceId(id);
// Before v11, resource ID was directly used as local ID. Such entries
// can be migrated by adding an identity ID mapping.

Powered by Google App Engine
This is Rietveld 408576698