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

Unified Diff: chrome/browser/plugins/flash_download_interception.cc

Issue 2945243002: Permissions: Allow PermissionManager to return more PermissionStatusSources.
Patch Set: Cleanup. Created 3 years, 6 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
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 f9a7b4440a8c2ed308a6bc399ea8a0505420970f..278a68a872f2352fd73ee3de3df4f9ad302ac7b4 100644
--- a/chrome/browser/plugins/flash_download_interception.cc
+++ b/chrome/browser/plugins/flash_download_interception.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/permissions/permission_manager.h"
+#include "chrome/browser/permissions/permission_result.h"
#include "chrome/browser/plugins/plugin_utils.h"
#include "chrome/browser/plugins/plugins_field_trial.h"
#include "chrome/browser/profiles/profile.h"
@@ -65,8 +66,11 @@ void FlashDownloadInterception::InterceptFlashDownloadNavigation(
Profile::FromBrowserContext(web_contents->GetBrowserContext());
HostContentSettingsMap* host_content_settings_map =
HostContentSettingsMapFactory::GetForProfile(profile);
- ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting(
- host_content_settings_map, url::Origin(source_url), source_url, nullptr);
+ ContentSetting flash_setting =
+ PluginUtils::GetFlashPluginContentSetting(host_content_settings_map,
+ url::Origin(source_url),
+ source_url, nullptr)
+ .content_setting;
flash_setting = PluginsFieldTrial::EffectiveContentSetting(
host_content_settings_map, CONTENT_SETTINGS_TYPE_PLUGINS, flash_setting);
@@ -114,9 +118,11 @@ bool FlashDownloadInterception::ShouldStopFlashDownloadAction(
RE2::FullMatch(target_url_str, kGetFlashURLSecondaryGoRegex) ||
(RE2::FullMatch(target_url_str, kGetFlashURLSecondaryDownloadRegex) &&
target_url.query() == kGetFlashURLSecondaryDownloadQuery)) {
- ContentSetting flash_setting = PluginUtils::GetFlashPluginContentSetting(
- host_content_settings_map, url::Origin(source_url), source_url,
- nullptr);
+ ContentSetting flash_setting =
+ PluginUtils::GetFlashPluginContentSetting(host_content_settings_map,
+ url::Origin(source_url),
+ source_url, nullptr)
+ .content_setting;
flash_setting = PluginsFieldTrial::EffectiveContentSetting(
host_content_settings_map, CONTENT_SETTINGS_TYPE_PLUGINS,
flash_setting);
« no previous file with comments | « chrome/browser/plugins/chrome_plugin_service_filter.cc ('k') | chrome/browser/plugins/flash_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698