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

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

Issue 11106007: drive: Rename 'gdata' namespace to 'drive' in chrome/browser/chromeos/drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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/drive/drive_files.h ('k') | chrome/browser/chromeos/drive/drive_protocol_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/chromeos/drive/drive_files.h ('k') | chrome/browser/chromeos/drive/drive_protocol_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698