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

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

Issue 107293013: drive: Stop comparing resource ID against kDriveGrandRootLocalId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/change_list_processor.cc
diff --git a/chrome/browser/chromeos/drive/change_list_processor.cc b/chrome/browser/chromeos/drive/change_list_processor.cc
index 2705aee348fc1e8215c5d2ce7d72824b4a7a8228..7a8db8c52a54fa5e24de61630f0f64008aee8b4d 100644
--- a/chrome/browser/chromeos/drive/change_list_processor.cc
+++ b/chrome/browser/chromeos/drive/change_list_processor.cc
@@ -56,7 +56,8 @@ class ChangeListToEntryMapUMAStats {
} // namespace
std::string DirectoryFetchInfo::ToString() const {
- return ("resource_id: " + resource_id_ +
+ return ("local_id: " + local_id_ +
+ ", resource_id: " + resource_id_ +
", changestamp: " + base::Int64ToString(changestamp_));
}
@@ -357,15 +358,9 @@ FileError ChangeListProcessor::RefreshDirectory(
base::FilePath* out_file_path) {
DCHECK(!directory_fetch_info.empty());
- std::string directory_local_id;
- FileError error = resource_metadata->GetIdByResourceId(
- directory_fetch_info.resource_id(), &directory_local_id);
- if (error != FILE_ERROR_OK)
- return error;
-
ResourceEntry directory;
- error = resource_metadata->GetResourceEntryById(directory_local_id,
- &directory);
+ FileError error = resource_metadata->GetResourceEntryById(
+ directory_fetch_info.local_id(), &directory);
if (error != FILE_ERROR_OK)
return error;
@@ -389,7 +384,7 @@ FileError ChangeListProcessor::RefreshDirectory(
continue;
}
- entry->set_parent_local_id(directory_local_id);
+ entry->set_parent_local_id(directory_fetch_info.local_id());
std::string local_id;
error = resource_metadata->GetIdByResourceId(entry->resource_id(),
@@ -416,7 +411,8 @@ FileError ChangeListProcessor::RefreshDirectory(
if (error != FILE_ERROR_OK)
return error;
- *out_file_path = resource_metadata->GetFilePath(directory_local_id);
+ *out_file_path = resource_metadata->GetFilePath(
+ directory_fetch_info.local_id());
return FILE_ERROR_OK;
}
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_processor.h ('k') | chrome/browser/chromeos/drive/change_list_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698