Index: chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
diff --git a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
index 588462ac4e3a36c275f01e42eb690b5e82118949..97a838e6b3fae5abf8573b19f2c0dc6f64ffc164 100644 |
--- a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
+++ b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
@@ -22,18 +22,12 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64); |
@implementation PendingPasswordViewController |
-- (id)initWithModel:(ManagePasswordsBubbleModel*)model |
- delegate:(id<ManagePasswordsBubbleContentViewDelegate>)delegate { |
- if (([super initWithDelegate:delegate])) { |
- model_ = model; |
- } |
- return self; |
-} |
- |
- (BOOL)textView:(NSTextView*)textView |
clickedOnLink:(id)link |
atIndex:(NSUInteger)charIndex { |
- model_->OnBrandLinkClicked(); |
+ ManagePasswordsBubbleModel* model = [self model]; |
+ if (model) |
+ model->OnBrandLinkClicked(); |
[delegate_ viewShouldDismiss]; |
return YES; |
} |
@@ -90,8 +84,9 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64); |
[view addSubview:closeButton_]; |
// Title. |
+ ManagePasswordsBubbleModel* model = [self model]; |
HyperlinkTextView* titleView = TitleLabelWithLink( |
- model_->title(), model_->title_brand_link_range(), self); |
+ model->title(), model->title_brand_link_range(), self); |
// Force the text to wrap to fit in the bubble size. |
int titleRightPadding = |
@@ -177,7 +172,7 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64); |
} |
- (ManagePasswordsBubbleModel*)model { |
- return model_; |
+ return [delegate_ model]; |
} |
@end |