| 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..085e3733a3be9ff68f7785246f225f33ed2c1a72 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
|
| @@ -236,6 +236,10 @@ bool IsInternalURL(const GURL& url) {
|
| return self;
|
| }
|
|
|
| +- (Profile*)profile {
|
| + return Profile::FromBrowserContext(webContents_->GetBrowserContext());
|
| +}
|
| +
|
| - (void)windowWillClose:(NSNotification*)notification {
|
| if (presenter_.get())
|
| presenter_->OnUIClosing();
|
| @@ -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.
|
|
|