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

Unified Diff: chrome/browser/chromeos/drive/document_entry_conversion.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: 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
Index: chrome/browser/chromeos/drive/document_entry_conversion.cc
diff --git a/chrome/browser/chromeos/drive/document_entry_conversion.cc b/chrome/browser/chromeos/drive/document_entry_conversion.cc
index dc8b6678ff10b7547fc25cd3cda2ed14a2604b06..bf6cc9a5532836d9d7048a1ed7b5b94493d55048 100644
--- a/chrome/browser/chromeos/drive/document_entry_conversion.cc
+++ b/chrome/browser/chromeos/drive/document_entry_conversion.cc
@@ -13,10 +13,10 @@
#include "googleurl/src/gurl.h"
#include "net/base/escape.h"
-namespace gdata {
+namespace drive {
DriveEntryProto ConvertDocumentEntryToDriveEntryProto(
- const DocumentEntry& doc) {
+ const gdata::DocumentEntry& doc) {
DriveEntryProto entry_proto;
// For regular files, the 'filename' and 'title' attribute in the metadata
@@ -29,11 +29,11 @@ DriveEntryProto ConvertDocumentEntryToDriveEntryProto(
entry_proto.set_resource_id(doc.resource_id());
entry_proto.set_content_url(doc.content_url().spec());
- const Link* edit_link = doc.GetLinkByType(Link::LINK_EDIT);
+ const gdata::Link* edit_link = doc.GetLinkByType(gdata::Link::LINK_EDIT);
if (edit_link)
entry_proto.set_edit_url(edit_link->href().spec());
- const Link* parent_link = doc.GetLinkByType(Link::LINK_PARENT);
+ const gdata::Link* parent_link = doc.GetLinkByType(gdata::Link::LINK_PARENT);
if (parent_link) {
entry_proto.set_parent_resource_id(
util::ExtractResourceIdFromUrl(parent_link->href()));
@@ -59,8 +59,8 @@ DriveEntryProto ConvertDocumentEntryToDriveEntryProto(
// 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)
entry_proto.set_upload_url(upload_link->href().spec());
} else if (doc.is_hosted_document()) {
@@ -79,23 +79,25 @@ DriveEntryProto ConvertDocumentEntryToDriveEntryProto(
file_specific_info->set_content_mime_type(doc.content_mime_type());
file_specific_info->set_is_hosted_document(doc.is_hosted_document());
- const Link* thumbnail_link = doc.GetLinkByType(Link::LINK_THUMBNAIL);
+ const gdata::Link* thumbnail_link = doc.GetLinkByType(
+ gdata::Link::LINK_THUMBNAIL);
if (thumbnail_link)
file_specific_info->set_thumbnail_url(thumbnail_link->href().spec());
- const Link* alternate_link = doc.GetLinkByType(Link::LINK_ALTERNATE);
+ const gdata::Link* alternate_link = doc.GetLinkByType(
+ gdata::Link::LINK_ALTERNATE);
if (alternate_link)
file_specific_info->set_alternate_url(alternate_link->href().spec());
} else if (doc.is_folder()) {
- 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)
entry_proto.set_upload_url(upload_link->href().spec());
} else {
- NOTREACHED() << "Unknown DocumentEntry type";
+ NOTREACHED() << "Unknown gdata::DocumentEntry type";
}
return entry_proto;
}
-} // namespace gdata
+} // namespace drive

Powered by Google App Engine
This is Rietveld 408576698