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

Unified Diff: chrome/browser/download/download_resource_throttle.cc

Issue 2850223002: remove reliance on webcontents when requesting storage permission (Closed)
Patch Set: fix mock class Created 3 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
« no previous file with comments | « chrome/browser/android/download/mock_download_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_resource_throttle.cc
diff --git a/chrome/browser/download/download_resource_throttle.cc b/chrome/browser/download/download_resource_throttle.cc
index e871562e01fa2d97ae8d0159046a48fb8e7f6600..5b2942490b296adf42d61ec0e74ecd9502cfb350 100644
--- a/chrome/browser/download/download_resource_throttle.cc
+++ b/chrome/browser/download/download_resource_throttle.cc
@@ -51,14 +51,9 @@ void CanDownloadOnUIThread(
std::unique_ptr<DownloadResourceThrottle::DownloadRequestInfo> info) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
#if defined(OS_ANDROID)
- content::WebContents* contents = info->web_contents_getter.Run();
- if (contents) {
- DownloadControllerBase::Get()->AcquireFileAccessPermission(
- contents, base::Bind(&OnAcquireFileAccessPermissionDone,
- base::Passed(std::move(info))));
- } else {
- OnAcquireFileAccessPermissionDone(std::move(info), false);
- }
+ DownloadControllerBase::Get()->AcquireFileAccessPermission(
+ info->web_contents_getter, base::Bind(&OnAcquireFileAccessPermissionDone,
+ base::Passed(std::move(info))));
#else
CanDownload(std::move(info));
#endif
« no previous file with comments | « chrome/browser/android/download/mock_download_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698