| Index: chrome/browser/plugins/flash_download_interception.cc
|
| diff --git a/chrome/browser/plugins/flash_download_interception.cc b/chrome/browser/plugins/flash_download_interception.cc
|
| index 7c2d8118ed8b869d9d63a2492d18a2a8a1b00503..032830b00999ce6cfd7fb95810afb94b6675123b 100644
|
| --- a/chrome/browser/plugins/flash_download_interception.cc
|
| +++ b/chrome/browser/plugins/flash_download_interception.cc
|
| @@ -31,21 +31,26 @@ const char kFlashDownloadURL[] = "get.adobe.com/flash";
|
|
|
| void DoNothing(blink::mojom::PermissionStatus result) {}
|
|
|
| -bool ShouldInterceptNavigation(
|
| +bool InterceptNavigation(
|
| content::WebContents* source,
|
| const navigation_interception::NavigationParams& params) {
|
| + FlashDownloadInterception::InterceptFlashDownloadNavigation(source);
|
| + return true;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +// static
|
| +void FlashDownloadInterception::InterceptFlashDownloadNavigation(
|
| + content::WebContents* source) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| PermissionManager* manager = PermissionManager::Get(
|
| Profile::FromBrowserContext(source->GetBrowserContext()));
|
| manager->RequestPermission(
|
| content::PermissionType::FLASH, source->GetMainFrame(),
|
| source->GetLastCommittedURL(), true, base::Bind(&DoNothing));
|
| -
|
| - return true;
|
| }
|
|
|
| -} // namespace
|
| -
|
| // static
|
| bool FlashDownloadInterception::ShouldStopFlashDownloadAction(
|
| HostContentSettingsMap* host_content_settings_map,
|
| @@ -92,5 +97,5 @@ FlashDownloadInterception::MaybeCreateThrottleFor(NavigationHandle* handle) {
|
| }
|
|
|
| return base::MakeUnique<navigation_interception::InterceptNavigationThrottle>(
|
| - handle, base::Bind(&ShouldInterceptNavigation), true);
|
| + handle, base::Bind(&InterceptNavigation), true);
|
| }
|
|
|