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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.h

Issue 16092009: Make sure OneClickSigninSyncStarter detects Browser object being closed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch before 2nd commit Created 7 years, 6 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/sync/one_click_signin_sync_starter.h
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.h b/chrome/browser/ui/sync/one_click_signin_sync_starter.h
index 007b4690fcaaabe2c2dc31aade51065efa9f48f1..6209f736a6b31003ad86639f16362196fc37d322 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.h
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.h
@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_tracker.h"
+#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/browser/ui/host_desktop.h"
class Browser;
@@ -22,7 +23,8 @@ class CloudPolicyClient;
// Waits for successful singin notification from the signin manager and then
// starts the sync machine. Instances of this class delete themselves once
// the job is done.
-class OneClickSigninSyncStarter : public SigninTracker::Observer {
+class OneClickSigninSyncStarter : public SigninTracker::Observer,
+ public chrome::BrowserListObserver {
public:
enum StartSyncMode {
// Starts the process of signing the user in with the SigninManager, and
@@ -64,6 +66,9 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer {
bool force_same_tab_navigation,
ConfirmationRequired display_confirmation);
+ // chrome::BrowserListObserver override.
+ virtual void OnBrowserRemoved(Browser* browser) OVERRIDE;
+
private:
virtual ~OneClickSigninSyncStarter();

Powered by Google App Engine
This is Rietveld 408576698