Chromium Code Reviews| Index: chrome/browser/ui/webui/signin/sync_confirmation_handler.h |
| diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler.h b/chrome/browser/ui/webui/signin/sync_confirmation_handler.h |
| index 5792dbc37999fcee1b3d17acb948e9ecf695321e..de4d08ec43dca9782cac34d48364c7a192d9e596 100644 |
| --- a/chrome/browser/ui/webui/signin/sync_confirmation_handler.h |
| +++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler.h |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include "base/macros.h" |
| +#include "chrome/browser/ui/browser_list_observer.h" |
| #include "chrome/browser/ui/webui/signin/login_ui_service.h" |
| #include "components/signin/core/browser/account_tracker_service.h" |
| #include "content/public/browser/web_ui_message_handler.h" |
| @@ -17,9 +18,10 @@ class ListValue; |
| } |
| class SyncConfirmationHandler : public content::WebUIMessageHandler, |
| - public AccountTrackerService::Observer { |
| + public AccountTrackerService::Observer, |
| + public chrome::BrowserListObserver { |
| public: |
| - SyncConfirmationHandler(); |
| + explicit SyncConfirmationHandler(Browser* browser); |
| ~SyncConfirmationHandler() override; |
| // content::WebUIMessageHandler: |
| @@ -28,6 +30,9 @@ class SyncConfirmationHandler : public content::WebUIMessageHandler, |
| // AccountTrackerService::Observer: |
| void OnAccountUpdated(const AccountInfo& info) override; |
| + // chrome::BrowserListObserver: |
| + void OnBrowserRemoved(Browser* browser) override; |
| + |
| protected: |
| // Handles "confirm" message from the page. No arguments. |
| // This message is sent when the user confirms that they want complete sign in |
| @@ -60,6 +65,11 @@ class SyncConfirmationHandler : public content::WebUIMessageHandler, |
| LoginUIService::SyncConfirmationUIClosedResult result); |
| private: |
| + Profile* profile_; |
| + |
| + // Weak reference to the browser that shown the sync confirmation dialog. |
|
tommycli
2017/03/28 16:24:47
*that showed
msarda
2017/03/29 08:24:01
Done.
|
| + Browser* browser_; |
| + |
| // Records whether the user clicked on Undo, Ok, or Settings. |
| bool did_user_explicitly_interact; |