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

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

Issue 1055403004: Fix cast from video player by using DriveApiUrlGenerator to generate URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/extensions/file_manager/private_api_drive.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8b38af9234eca2a2b1ae38f9044d070417023ac7..60e86dcb3aa981c22480b29e9340db448f8e4822 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -1034,9 +1034,10 @@ void FileManagerPrivateGetDownloadUrlFunction::OnGetResourceEntry(
return;
}
- download_url_ =
- google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction +
- entry->resource_id();
+ DriveApiUrlGenerator url_generator(
+ (GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction)),
+ (GURL(google_apis::DriveApiUrlGenerator::kBaseDownloadUrlForProduction)));
+ download_url_ = url_generator.GenerateDownloadFileUrl(entry->resource_id());
ProfileOAuth2TokenService* oauth2_token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(GetProfile());
@@ -1065,7 +1066,8 @@ void FileManagerPrivateGetDownloadUrlFunction::OnTokenFetched(
return;
}
- const std::string url = download_url_ + "?access_token=" + access_token;
+ const std::string url =
+ download_url_.Resolve("?access_token=" + access_token).spec();
SetResult(new base::StringValue(url));
SendResponse(true);
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_drive.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698