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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.h

Issue 1304943006: ProfileChooserVIew heap-use-after-free fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/views/profiles/profile_chooser_view.h
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.h b/chrome/browser/ui/views/profiles/profile_chooser_view.h
index f1d78921f05102a921768238d8a6f899a016e2e0..07e7c28420dd4dd83f0133e6f69dd36971c1d1ac 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.h
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.h
@@ -11,6 +11,7 @@
#include "chrome/browser/profiles/avatar_menu.h"
#include "chrome/browser/profiles/avatar_menu_observer.h"
#include "chrome/browser/profiles/profile_metrics.h"
+#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/profile_chooser_constants.h"
#include "components/signin/core/browser/signin_header_helper.h"
@@ -47,7 +48,8 @@ class ProfileChooserView : public content::WebContentsDelegate,
public views::StyledLabelListener,
public views::TextfieldController,
public AvatarMenuObserver,
- public OAuth2TokenService::Observer {
+ public OAuth2TokenService::Observer,
+ public chrome::BrowserListObserver {
public:
// Shows the bubble if one is not already showing. This allows us to easily
// make a button toggle the bubble on and off when clicked: we unconditionally
@@ -110,6 +112,9 @@ class ProfileChooserView : public content::WebContentsDelegate,
void OnRefreshTokenAvailable(const std::string& account_id) override;
void OnRefreshTokenRevoked(const std::string& account_id) override;
+ // chrome::BrowserListObserver overrides:
+ void OnBrowserRemoved(Browser* browser) override;
+
static ProfileChooserView* profile_bubble_;
// We normally close the bubble any time it becomes inactive but this can lead

Powered by Google App Engine
This is Rietveld 408576698