diff options
Diffstat (limited to 'chrome/browser/chromeos')
4 files changed, 19 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/gdata/drive_uploader.cc b/chrome/browser/chromeos/gdata/drive_uploader.cc index 059ff6c..fe769e8 100644 --- a/chrome/browser/chromeos/gdata/drive_uploader.cc +++ b/chrome/browser/chromeos/gdata/drive_uploader.cc @@ -542,11 +542,11 @@ int64 DriveUploader::UploadFileInfo::SizeRemaining() const { std::string DriveUploader::UploadFileInfo::DebugString() const { return "title=[" + title + - "], file_path=[" + file_path.value() + + "], file_path=[" + file_path.AsUTF8Unsafe() + "], content_type=[" + content_type + "], content_length=[" + base::UintToString(content_length) + "], file_size=[" + base::UintToString(file_size) + - "], drive_path=[" + drive_path.value() + + "], drive_path=[" + drive_path.AsUTF8Unsafe() + "]"; } diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc index cb03ff6..a4471e1 100644 --- a/chrome/browser/chromeos/gdata/gdata_operations.cc +++ b/chrome/browser/chromeos/gdata/gdata_operations.cc @@ -418,7 +418,7 @@ bool CreateDirectoryOperation::GetContentData(std::string* upload_content_type, "http://schemas.google.com/docs/2007#folder"); xml_writer.EndElement(); // Ends "category" element. - xml_writer.WriteElement("title", directory_name_); + xml_writer.WriteElement("title", FilePath(directory_name_).AsUTF8Unsafe()); xml_writer.EndElement(); // Ends "entry" element. xml_writer.StopWriting(); @@ -459,7 +459,7 @@ bool CopyDocumentOperation::GetContentData(std::string* upload_content_type, xml_writer.AddAttribute("xmlns", "http://www.w3.org/2005/Atom"); xml_writer.WriteElement("id", resource_id_); - xml_writer.WriteElement("title", new_name_); + xml_writer.WriteElement("title", FilePath(new_name_).AsUTF8Unsafe()); xml_writer.EndElement(); // Ends "entry" element. xml_writer.StopWriting(); @@ -505,7 +505,7 @@ bool RenameResourceOperation::GetContentData(std::string* upload_content_type, xml_writer.StartElement("entry"); xml_writer.AddAttribute("xmlns", "http://www.w3.org/2005/Atom"); - xml_writer.WriteElement("title", new_name_); + xml_writer.WriteElement("title", FilePath(new_name_).AsUTF8Unsafe()); xml_writer.EndElement(); // Ends "entry" element. xml_writer.StopWriting(); diff --git a/chrome/browser/chromeos/gdata/gdata_wapi_parser.cc b/chrome/browser/chromeos/gdata/gdata_wapi_parser.cc index 3a1d685..01294c0 100644 --- a/chrome/browser/chromeos/gdata/gdata_wapi_parser.cc +++ b/chrome/browser/chromeos/gdata/gdata_wapi_parser.cc @@ -649,7 +649,11 @@ std::string DocumentEntry::GetHostedDocumentExtension() const { // static bool DocumentEntry::HasHostedDocumentExtension(const FilePath& file) { - FilePath::StringType file_extension = file.Extension(); +#if defined(OS_WIN) + std::string file_extension = WideToUTF8(file.Extension()); +#else + std::string file_extension = file.Extension(); +#endif for (size_t i = 0; i < arraysize(kEntryKindMap); ++i) { const char* document_extension = kEntryKindMap[i].extension; if (document_extension && file_extension == document_extension) diff --git a/chrome/browser/chromeos/gdata/gdata_wapi_parser.h b/chrome/browser/chromeos/gdata/gdata_wapi_parser.h index 25f85d0..210310b 100644 --- a/chrome/browser/chromeos/gdata/gdata_wapi_parser.h +++ b/chrome/browser/chromeos/gdata/gdata_wapi_parser.h @@ -438,20 +438,24 @@ class DocumentEntry : public FeedEntry { // True if document entry is remotely hosted. bool is_hosted_document() const { - return ClassifyEntryKind(kind_) & KIND_OF_HOSTED_DOCUMENT; + return (ClassifyEntryKind(kind_) & KIND_OF_HOSTED_DOCUMENT) > 0; } // True if document entry hosted by Google Documents. bool is_google_document() const { - return ClassifyEntryKind(kind_) & KIND_OF_GOOGLE_DOCUMENT; + return (ClassifyEntryKind(kind_) & KIND_OF_GOOGLE_DOCUMENT) > 0; } // True if document entry is hosted by an external application. bool is_external_document() const { - return ClassifyEntryKind(kind_) & KIND_OF_EXTERNAL_DOCUMENT; + return (ClassifyEntryKind(kind_) & KIND_OF_EXTERNAL_DOCUMENT) > 0; } // True if document entry is a folder (collection). - bool is_folder() const { return ClassifyEntryKind(kind_) & KIND_OF_FOLDER; } + bool is_folder() const { + return (ClassifyEntryKind(kind_) & KIND_OF_FOLDER) > 0; + } // True if document entry is regular file. - bool is_file() const { return ClassifyEntryKind(kind_) & KIND_OF_FILE; } + bool is_file() const { + return (ClassifyEntryKind(kind_) & KIND_OF_FILE) > 0; + } // True if document entry can't be mapped to the file system. bool is_special() const { return !is_file() && !is_folder() && !is_hosted_document(); |