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); |