Commit 915cbbca authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Gave three OnAcquireFileAccessPermissionDone their own names

In jumbo builds many cc files compile in the same translation
unit and if that causes there to be overloaded functions,
the address operator won't know what function's address the
code refers to. This happens in base::Bind, and results
in compilation failures.

In preparation for jumbo in chrome/browser, this patch renames
the three OnAcquireFileAccessPermissionDone to
OnDownloadAcquireFileAccessPermissionDone
OnThrottleAcquireFileAccessPermissionDone
OnOfflinePageAcquireFileAccessPermissionDone

Bug: 746957
Change-Id: I6bd1fa44e9cc1ab44d9bdb653dd8117280ff9325
Reviewed-on: https://chromium-review.googlesource.com/897943Reviewed-by: default avatarCathy Li <chili@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534197}
parent 94fab77f
......@@ -241,7 +241,7 @@ void CheckCanDownload(
#if defined(OS_ANDROID)
// TODOD(qinmin): reuse the similar function defined in
// DownloadResourceThrottle.
void OnAcquireFileAccessPermissionDone(
void OnDownloadAcquireFileAccessPermissionDone(
const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
const GURL& url,
const std::string& request_method,
......@@ -1081,8 +1081,8 @@ void ChromeDownloadManagerDelegate::CheckDownloadAllowed(
#if defined(OS_ANDROID)
DownloadControllerBase::Get()->AcquireFileAccessPermission(
web_contents_getter,
base::Bind(&OnAcquireFileAccessPermissionDone, web_contents_getter, url,
request_method, base::Passed(&cb)));
base::Bind(&OnDownloadAcquireFileAccessPermissionDone,
web_contents_getter, url, request_method, base::Passed(&cb)));
#else
CheckCanDownload(web_contents_getter, url, request_method, std::move(cb));
#endif
......
......@@ -37,7 +37,7 @@ void CanDownload(
}
#if defined(OS_ANDROID)
void OnAcquireFileAccessPermissionDone(
void OnThrottleAcquireFileAccessPermissionDone(
std::unique_ptr<DownloadResourceThrottle::DownloadRequestInfo> info,
bool granted) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
......@@ -55,7 +55,8 @@ void CanDownloadOnUIThread(
const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter =
info->web_contents_getter;
DownloadControllerBase::Get()->AcquireFileAccessPermission(
web_contents_getter, base::Bind(&OnAcquireFileAccessPermissionDone,
web_contents_getter,
base::Bind(&OnThrottleAcquireFileAccessPermissionDone,
base::Passed(std::move(info))));
#else
CanDownload(std::move(info));
......
......@@ -224,7 +224,7 @@ content::ResourceRequestInfo::WebContentsGetter GetWebContentsGetter(
web_contents->GetMainFrame()->GetRoutingID());
}
void OnAcquireFileAccessPermissionDone(
void OnOfflinePageAcquireFileAccessPermissionDone(
const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
bool granted) {
if (!granted)
......@@ -302,7 +302,8 @@ void JNI_OfflinePageDownloadBridge_StartDownload(
GetWebContentsGetter(web_contents);
DownloadControllerBase::Get()->AcquireFileAccessPermission(
web_contents_getter,
base::Bind(&OnAcquireFileAccessPermissionDone, web_contents_getter));
base::Bind(&OnOfflinePageAcquireFileAccessPermissionDone,
web_contents_getter));
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment