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

Unified Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm

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
Index: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
index e8d55a729b4a53b632c4b426f33db95bba9d753e..f5dac295e508a010354408c896f6c51fcc9faaa4 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
@@ -264,7 +264,6 @@ const ContentTypeToNibPath kNibPaths[] = {
{CONTENT_SETTINGS_TYPE_GEOLOCATION, @"ContentBlockedGeolocation"},
{CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, @"ContentBlockedMixedScript"},
{CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, @"ContentProtocolHandlers"},
- {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, @"ContentBlockedDownloads"},
{CONTENT_SETTINGS_TYPE_MIDI_SYSEX, @"ContentBlockedMIDISysEx"},
};
@@ -313,6 +312,9 @@ const ContentTypeToNibPath kNibPaths[] = {
if (model->AsSubresourceFilterBubbleModel())
nibPath = @"ContentSubresourceFilter";
+
+ if (model->AsDownloadsBubbleModel())
+ nibPath = @"ContentBlockedDownloads";
return nibPath;
}
@@ -794,7 +796,8 @@ const ContentTypeToNibPath kNibPaths[] = {
[[self bubble] setArrowLocation:info_bubble::kTopTrailing];
// Adapt window size to bottom buttons. Do this before all other layouting.
- if (simple_bubble && !simple_bubble->bubble_content().manage_text.empty())
+ if ((simple_bubble && !simple_bubble->bubble_content().manage_text.empty()) ||
+ contentSettingBubbleModel_->AsDownloadsBubbleModel())
[self initManageDoneButtons];
[self initializeTitle];

Powered by Google App Engine
This is Rietveld 408576698