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

Unified Diff: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm

Issue 1415743002: Prevent the Online Reauth window from opening twice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
index 3a34663b15e1c9b00cebcb53b63c959d42c25f08..0942d4d2feb2532da383a1ef11e3ce76125c8ced 100644
--- a/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac.mm
@@ -365,15 +365,18 @@ class ReauthDialogDelegate : public UserManager::ReauthDialogObserver,
}
- (void)showReauthDialogWithProfile:(Profile*)profile email:(std::string)email {
- reauth_window_controller_.reset(
- [[ReauthDialogWindowController alloc]
- initWithProfile:profile
- email:email
- webContents:webContents_.get()]);
+ if (!reauth_window_controller_.get()) {
groby-ooo-7-16 2015/10/19 20:09:31 Nit: no .get() needed
anthonyvd 2015/10/20 19:40:49 Done.
+ reauth_window_controller_.reset(
+ [[ReauthDialogWindowController alloc]
+ initWithProfile:profile
+ email:email
+ webContents:webContents_.get()]);
+ }
}
- (void)closeReauthDialog {
[reauth_window_controller_ close];
+ reauth_window_controller_.reset();
groby-ooo-7-16 2015/10/19 20:09:31 Q: Doesn't reset() imply -close?
anthonyvd 2015/10/20 19:40:49 It does, thanks for noticing!
}
@end
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698