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

Unified Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

Issue 2408613002: Replace kPreferHtmlOverPlugins feature checks with PluginUtils::ShouldPreferHtmlOverPlugi… (Closed)
Patch Set: Replace remaining kPreferHtmlOverPlugins feature checks with PluginUtils::ShouldPreferHtmlOverPlugi… Created 4 years, 2 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/website_settings/website_settings_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
index a6a2128724f92a3941a32e8b7fbfedf41b6704d3..3a8b6e70d52c3366fec2e0a7d7add3a0dd1b0432 100644
--- a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
@@ -179,6 +179,10 @@ NSPoint AnchorPointForWindow(NSWindow* parent) {
@implementation WebsiteSettingsBubbleController
+- (Profile*)profile {
tapted 2016/10/11 02:22:16 nit: move after the initializer (line ~242)
raymes 2016/10/11 03:50:02 Done.
+ return Profile::FromBrowserContext(webContents_->GetBrowserContext());
+}
+
- (CGFloat)defaultWindowWidth {
return kDefaultWindowWidth;
}
@@ -737,12 +741,14 @@ bool IsInternalURL(const GURL& url) {
base::scoped_nsobject<PermissionSelectorButton> button(
[[PermissionSelectorButton alloc] initWithPermissionInfo:permissionInfo
forURL:url
- withCallback:callback]);
+ withCallback:callback
+ profile:[self profile]]);
// Determine the largest possible size for this button.
- CGFloat maxTitleWidth = [button
- maxTitleWidthForContentSettingsType:permissionInfo.type
- withDefaultSetting:permissionInfo.default_setting];
+ CGFloat maxTitleWidth =
+ [button maxTitleWidthForContentSettingsType:permissionInfo.type
+ withDefaultSetting:permissionInfo.default_setting
+ profile:[self profile]];
// Ensure the containing view is large enough to contain the button with its
// widest possible title.

Powered by Google App Engine
This is Rietveld 408576698