| Index: chrome/browser/chromeos/drive/drive_files.cc
|
| diff --git a/chrome/browser/chromeos/drive/drive_files.cc b/chrome/browser/chromeos/drive/drive_files.cc
|
| index e1e8359e4d4c61cea45d1e6c3e8a5495c83db39b..da6650460e44c37b17559defdb6bf4e6f42f3817 100644
|
| --- a/chrome/browser/chromeos/drive/drive_files.cc
|
| +++ b/chrome/browser/chromeos/drive/drive_files.cc
|
| @@ -14,7 +14,7 @@
|
| #include "chrome/browser/google_apis/gdata_wapi_parser.h"
|
| #include "net/base/escape.h"
|
|
|
| -namespace gdata {
|
| +namespace drive {
|
|
|
| // DriveEntry class.
|
|
|
| @@ -36,7 +36,7 @@ DriveDirectory* DriveEntry::AsDriveDirectory() {
|
| return NULL;
|
| }
|
|
|
| -void DriveEntry::InitFromDocumentEntry(const DocumentEntry& doc) {
|
| +void DriveEntry::InitFromDocumentEntry(const gdata::DocumentEntry& doc) {
|
| // For regular files, the 'filename' and 'title' attribute in the metadata
|
| // may be different (e.g. due to rename). To be consistent with the web
|
| // interface and other client to use the 'title' attribute, instead of
|
| @@ -56,11 +56,11 @@ void DriveEntry::InitFromDocumentEntry(const DocumentEntry& doc) {
|
| content_url_ = doc.content_url();
|
| deleted_ = doc.deleted();
|
|
|
| - const Link* edit_link = doc.GetLinkByType(Link::LINK_EDIT);
|
| + const gdata::Link* edit_link = doc.GetLinkByType(gdata::Link::LINK_EDIT);
|
| if (edit_link)
|
| edit_url_ = edit_link->href();
|
|
|
| - const Link* parent_link = doc.GetLinkByType(Link::LINK_PARENT);
|
| + const gdata::Link* parent_link = doc.GetLinkByType(gdata::Link::LINK_PARENT);
|
| if (parent_link)
|
| parent_resource_id_ = util::ExtractResourceIdFromUrl(parent_link->href());
|
| }
|
| @@ -96,7 +96,7 @@ void DriveEntry::SetBaseNameFromTitle() {
|
|
|
| DriveFile::DriveFile(DriveResourceMetadata* resource_metadata)
|
| : DriveEntry(resource_metadata),
|
| - kind_(ENTRY_KIND_UNKNOWN),
|
| + kind_(gdata::ENTRY_KIND_UNKNOWN),
|
| is_hosted_document_(false) {
|
| file_info_.is_directory = false;
|
| }
|
| @@ -116,7 +116,7 @@ void DriveFile::SetBaseNameFromTitle() {
|
| }
|
| }
|
|
|
| -void DriveFile::InitFromDocumentEntry(const DocumentEntry& doc) {
|
| +void DriveFile::InitFromDocumentEntry(const gdata::DocumentEntry& doc) {
|
| DriveEntry::InitFromDocumentEntry(doc);
|
|
|
| // Check if this entry is a true file, or...
|
| @@ -126,8 +126,8 @@ void DriveFile::InitFromDocumentEntry(const DocumentEntry& doc) {
|
|
|
| // The resumable-edit-media link should only be present for regular
|
| // files as hosted documents are not uploadable.
|
| - const Link* upload_link =
|
| - doc.GetLinkByType(Link::LINK_RESUMABLE_EDIT_MEDIA);
|
| + const gdata::Link* upload_link =
|
| + doc.GetLinkByType(gdata::Link::LINK_RESUMABLE_EDIT_MEDIA);
|
| if (upload_link)
|
| upload_url_ = upload_link->href();
|
| } else {
|
| @@ -148,11 +148,13 @@ void DriveFile::InitFromDocumentEntry(const DocumentEntry& doc) {
|
| // |is_hosted_document_| and |document_extension_| are set.
|
| SetBaseNameFromTitle();
|
|
|
| - const Link* thumbnail_link = doc.GetLinkByType(Link::LINK_THUMBNAIL);
|
| + const gdata::Link* thumbnail_link = doc.GetLinkByType(
|
| + gdata::Link::LINK_THUMBNAIL);
|
| if (thumbnail_link)
|
| thumbnail_url_ = thumbnail_link->href();
|
|
|
| - const Link* alternate_link = doc.GetLinkByType(Link::LINK_ALTERNATE);
|
| + const gdata::Link* alternate_link = doc.GetLinkByType(
|
| + gdata::Link::LINK_ALTERNATE);
|
| if (alternate_link)
|
| alternate_url_ = alternate_link->href();
|
| }
|
| @@ -172,11 +174,11 @@ DriveDirectory* DriveDirectory::AsDriveDirectory() {
|
| return this;
|
| }
|
|
|
| -void DriveDirectory::InitFromDocumentEntry(const DocumentEntry& doc) {
|
| +void DriveDirectory::InitFromDocumentEntry(const gdata::DocumentEntry& doc) {
|
| DriveEntry::InitFromDocumentEntry(doc);
|
|
|
| - const Link* upload_link =
|
| - doc.GetLinkByType(Link::LINK_RESUMABLE_CREATE_MEDIA);
|
| + const gdata::Link* upload_link =
|
| + doc.GetLinkByType(gdata::Link::LINK_RESUMABLE_CREATE_MEDIA);
|
| if (upload_link)
|
| upload_url_ = upload_link->href();
|
| }
|
| @@ -503,4 +505,4 @@ void DriveEntry::SerializeToString(std::string* serialized_proto) const {
|
| }
|
| }
|
|
|
| -} // namespace gdata
|
| +} // namespace drive
|
|
|