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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc

Issue 1965963003: Use new API to download blobs from Google Drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/extensions/file_manager/private_api_drive.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
index b0fa30f973725b6dee03efd879621e9b116ba136..95900de4ff5606b13871cdf37eeb42767457ecd8 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -97,8 +97,6 @@ void FillEntryPropertiesValueForDrive(const drive::ResourceEntry& entry_proto,
if (!entry_proto.resource_id().empty()) {
DriveApiUrlGenerator url_generator(
(GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction)),
- (GURL(
- google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction)),
(GURL(google_apis::DriveApiUrlGenerator::
kBaseThumbnailUrlForProduction)));
properties->thumbnail_url.reset(new std::string(
@@ -1105,7 +1103,6 @@ void FileManagerPrivateInternalGetDownloadUrlFunction::OnGetResourceEntry(
DriveApiUrlGenerator url_generator(
(GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction)),
- (GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction)),
(GURL(
google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction)));
download_url_ = url_generator.GenerateDownloadFileUrl(entry->resource_id());
@@ -1138,7 +1135,7 @@ void FileManagerPrivateInternalGetDownloadUrlFunction::OnTokenFetched(
}
const std::string url =
- download_url_.Resolve("?access_token=" + access_token).spec();
+ download_url_.Resolve("?alt=media&access_token=" + access_token).spec();
SetResult(new base::StringValue(url));
SendResponse(true);

Powered by Google App Engine
This is Rietveld 408576698