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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.h

Issue 13331007: Multi-account AccountChooser for interactive autocomplete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/autofill/autofill_dialog_controller_impl.h
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
index d6f7a5aa72309ca4ab0dc7713a8cce083ddb226c..a7cf9d198d465c5ab56f8bd7a3aea0931cc2f425 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
@@ -13,6 +13,7 @@
#include "base/memory/weak_ptr.h"
#include "base/string16.h"
#include "base/time.h"
+#include "chrome/browser/ui/autofill/account_chooser_model.h"
#include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
#include "chrome/browser/ui/autofill/autofill_dialog_models.h"
#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
@@ -203,18 +204,16 @@ class AutofillDialogControllerImpl : public AutofillDialogController,
// AccountChooserModelDelegate implementation.
virtual void AccountChoiceChanged() OVERRIDE;
+ virtual void UpdateAccountChooserView() OVERRIDE;
// wallet::WalletSigninHelperDelegate implementation.
- virtual void OnPassiveSigninSuccess(
- const std::string& auth_username) OVERRIDE;
+ virtual void OnPassiveSigninSuccess(const std::string& username) OVERRIDE;
virtual void OnPassiveSigninFailure(
const GoogleServiceAuthError& error) OVERRIDE;
- virtual void OnAutomaticSigninSuccess(
- const std::string& auth_username) OVERRIDE;
+ virtual void OnAutomaticSigninSuccess(const std::string& username) OVERRIDE;
virtual void OnAutomaticSigninFailure(
const GoogleServiceAuthError& error) OVERRIDE;
- virtual void OnUserNameFetchSuccess(
- const std::string& auth_username) OVERRIDE;
+ virtual void OnUserNameFetchSuccess(const std::string& username) OVERRIDE;
virtual void OnUserNameFetchFailure(
const GoogleServiceAuthError& error) OVERRIDE;
@@ -273,6 +272,10 @@ class AutofillDialogControllerImpl : public AutofillDialogController,
// Starts fetching the wallet items from Online Wallet.
void GetWalletItems();
+ // Handles the SignedInState() on Wallet or sign-in state update.
+ // Triggers the user name fetch and the passive/automatic sign-in.
+ void SignedInStateUpdated();
+
// Refreshes the model on Wallet or sign-in state update.
void OnWalletOrSigninUpdate();
@@ -413,12 +416,6 @@ class AutofillDialogControllerImpl : public AutofillDialogController,
// The helper is set only during fetch/sign-in, and NULL otherwise.
scoped_ptr<wallet::WalletSigninHelper> signin_helper_;
- // The user account name (email).
- // Valid only if PayingWithWallet() and SigninState() == SIGNED_IN.
- // Set whenever the sign-in helper fetches the user info.
- // TODO(aruslan): this should be removed (AccountChooser should deal with it).
- std::string current_username_;
-
// A client to talk to the Online Wallet API.
wallet::WalletClient wallet_client_;

Powered by Google App Engine
This is Rietveld 408576698