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

Unified Diff: chrome/browser/chromeos/gdata/gdata_files.cc

Issue 10270025: gdata: Remove use of FindEntryByPathAsync() from file_manager_util.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Created 8 years, 8 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 | « chrome/browser/chromeos/gdata/gdata.proto ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_files.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_files.cc b/chrome/browser/chromeos/gdata/gdata_files.cc
index 7774d328369fecdb213718f4493375ecf1d7f81e..f1dd5b5893ec557ac7557290a9ccc8b62e348ec5 100644
--- a/chrome/browser/chromeos/gdata/gdata_files.cc
+++ b/chrome/browser/chromeos/gdata/gdata_files.cc
@@ -643,6 +643,8 @@ void GDataEntry::FromProto(const GDataEntryProto& proto) {
file_info_.creation_time = base::Time::FromInternalValue(
proto.file_info().creation_time());
+ // Don't copy from proto.file_name() as file_name_ is computed in
+ // SetFileNameFromTitle().
title_ = proto.title();
resource_id_ = proto.resource_id();
parent_resource_id_ = proto.parent_resource_id();
@@ -663,6 +665,9 @@ void GDataEntry::ToProto(GDataEntryProto* proto) const {
proto_file_info->set_creation_time(
file_info_.creation_time.ToInternalValue());
+ // The file_name field is used in GetFileInfoByPathAsync(). As shown in
+ // FromProto(), the value is discard when deserializing from proto.
+ proto->set_file_name(file_name_);
proto->set_title(title_);
proto->set_resource_id(resource_id_);
proto->set_parent_resource_id(parent_resource_id_);
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698