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

Unified Diff: chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm

Issue 1637043002: Don't try to use ManagePasswordsBubbleModel if the password bubble was closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/passwords/save_pending_password_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm b/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm
index 1b7ff8e4346fc1acd015eb4a566da160b640ed32..537370ce07e5fc580e782f0d6df0bc46fad5e186 100644
--- a/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/save_pending_password_view_controller.mm
@@ -16,25 +16,21 @@
@implementation SavePendingPasswordViewController
-- (SavePendingPasswordViewController*)
-initWithModel:(ManagePasswordsBubbleModel*)model
- delegate:(id<ManagePasswordsBubbleContentViewDelegate>)delegate {
- self = [super initWithModel:model
- delegate:delegate];
- return self;
-}
-
- (NSButton*)defaultButton {
return saveButton_;
}
- (void)onSaveClicked:(id)sender {
- self.model->OnSaveClicked();
+ ManagePasswordsBubbleModel* model = self.model;
+ if (model)
+ model->OnSaveClicked();
[delegate_ viewShouldDismiss];
}
- (void)onNeverForThisSiteClicked:(id)sender {
- self.model->OnNeverForThisSiteClicked();
+ ManagePasswordsBubbleModel* model = self.model;
+ if (model)
+ model->OnNeverForThisSiteClicked();
[delegate_ viewShouldDismiss];
}

Powered by Google App Engine
This is Rietveld 408576698