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

Unified Diff: chrome/browser/ui/views/location_bar/content_setting_bubble_dialog_browsertest.cc

Issue 2561673003: Handle per-tab AUTOMATIC_DOWNLOADS setting in DownloadRequestLimiter. (Closed)
Patch Set: Get HostContentSettingsMap directly in DRL tests Created 3 years, 10 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/ui/content_settings/content_setting_image_model_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/content_setting_bubble_dialog_browsertest.cc
diff --git a/chrome/browser/ui/views/location_bar/content_setting_bubble_dialog_browsertest.cc b/chrome/browser/ui/views/location_bar/content_setting_bubble_dialog_browsertest.cc
index fd43ad93a7465114ba914e18de7239415cc4127d..85869fa15e59f38771ee999935b311c1d0a66894 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_bubble_dialog_browsertest.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_bubble_dialog_browsertest.cc
@@ -4,7 +4,9 @@
#include "base/memory/ptr_util.h"
#include "base/time/time.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
+#include "chrome/browser/download/download_request_limiter.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
@@ -52,6 +54,13 @@ void ContentSettingBubbleDialogTest::ShowDialogBubble(
case CONTENT_SETTINGS_TYPE_GEOLOCATION:
content_settings->OnGeolocationPermissionSet(GURL::EmptyGURL(), false);
break;
+ case CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS:
+ // Automatic downloads are handled by DownloadRequestLimiter.
+ g_browser_process->download_request_limiter()
+ ->GetDownloadState(web_contents, web_contents, true)
+ ->SetDownloadStatusAndNotify(
+ DownloadRequestLimiter::DOWNLOADS_NOT_ALLOWED);
+ break;
default:
// For all other content_types passed in, mark them as blocked.
content_settings->OnContentBlocked(content_type);
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_image_model_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698