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

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

Issue 9581024: Added proper extensions for hosted documents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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/gdata/gdata_file_system.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_file_system.cc (revision 124744)
+++ chrome/browser/chromeos/gdata/gdata_file_system.cc (working copy)
@@ -164,6 +164,7 @@
file->file_info_.size = doc->file_size();
file->file_md5_ = doc->file_md5();
} else {
+ DCHECK(doc->is_hosted_document());
// ... a hosted document.
file->original_file_name_ = UTF16ToUTF8(doc->title());
// Attach .g<something> extension to hosted documents so we can special
@@ -171,9 +172,7 @@
// TODO(zelidrag): Figure out better way how to pass entry info like kind
// to UI through the File API stack.
file->file_name_ = EscapeFileName(
- base::StringPrintf("%s.g%s",
- file->original_file_name_.c_str(),
- doc->GetEntryKindText().c_str()));
+ file->original_file_name_ + doc->GetHostedDocumentExtension());
// We don't know the size of hosted docs and it does not matter since
// is has no effect on the quota.
file->file_info_.size = 0;

Powered by Google App Engine
This is Rietveld 408576698