| Index: chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller.mm b/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller.mm
|
| index 4bf4d420b9630ec20b934121e8894e2dbace8a36..186e38a66bdc9eb5f459b360554fcd02225638b6 100644
|
| --- a/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller.mm
|
| @@ -17,30 +17,28 @@
|
|
|
| @implementation UpdatePendingPasswordViewController
|
|
|
| -- (UpdatePendingPasswordViewController*)
|
| -initWithModel:(ManagePasswordsBubbleModel*)model
|
| - delegate:(id<ManagePasswordsBubbleContentViewDelegate>)delegate {
|
| - self = [super initWithModel:model delegate:delegate];
|
| - return self;
|
| -}
|
| -
|
| - (NSButton*)defaultButton {
|
| return updateButton_;
|
| }
|
|
|
| - (void)onUpdateClicked:(id)sender {
|
| - if (passwordWithUsernameSelectionItem_) {
|
| - // Multi account case.
|
| - self.model->OnUpdateClicked(
|
| - *[passwordWithUsernameSelectionItem_ getSelectedCredentials]);
|
| - } else {
|
| - self.model->OnUpdateClicked(self.model->pending_password());
|
| + ManagePasswordsBubbleModel* model = [self model];
|
| + if (model) {
|
| + if (passwordWithUsernameSelectionItem_) {
|
| + // Multi account case.
|
| + model->OnUpdateClicked(
|
| + *[passwordWithUsernameSelectionItem_ getSelectedCredentials]);
|
| + } else {
|
| + model->OnUpdateClicked(model->pending_password());
|
| + }
|
| }
|
| [delegate_ viewShouldDismiss];
|
| }
|
|
|
| - (void)onNopeClicked:(id)sender {
|
| - self.model->OnNopeUpdateClicked();
|
| + ManagePasswordsBubbleModel* model = [self model];
|
| + if (model)
|
| + model->OnNopeUpdateClicked();
|
| [delegate_ viewShouldDismiss];
|
| }
|
|
|
|
|