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

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

Issue 23653052: [rAc] Fetch username concurrently with fetching Wallet items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests to not assume the account chooser menu model always exists. Created 7 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/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 699ebac46372fdefa9ea678ae6f8f9acd3144ead..b6803da4b2490c9aaf775b062b08958377cb2f69 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h
@@ -300,6 +300,9 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate,
// finish, which would be flaky.
void SubmitButtonDelayEndForTesting();
+ // Resets |last_wallet_items_fetch_timestamp_| for testing.
+ void ClearLastWalletItemsFetchTimestampForTesting();
+
private:
enum DialogSignedInState {
REQUIRES_RESPONSE,
@@ -558,6 +561,9 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate,
// Called when the delay for enabling the submit button ends.
void OnSubmitButtonDelayEnd();
+ // Initiates a fetch of the user's current Wallet cookie and Google username.
+ void FetchWalletCookieAndUserName();
+
// The |profile| for |contents_|.
Profile* const profile_;
@@ -582,10 +588,14 @@ class AutofillDialogControllerImpl : public AutofillDialogViewDelegate,
// and also tracks which data source the dialog is using.
AccountChooserModel account_chooser_model_;
- // The sign-in helper to fetch the user info and perform passive sign-in.
- // The helper is set only during fetch/sign-in, and NULL otherwise.
+ // The sign-in helper to fetch the user's Wallet cookie and to perform passive
+ // sign-in. The helper is set only during fetch/sign-in, and NULL otherwise.
scoped_ptr<wallet::WalletSigninHelper> signin_helper_;
+ // The sign-in helper to fetch the user's human-readable username. The helper
+ // is set only while fetching the username, and NULL otherwise.
+ scoped_ptr<wallet::WalletSigninHelper> username_fetcher_;
+
// A client to talk to the Online Wallet API.
wallet::WalletClient wallet_client_;

Powered by Google App Engine
This is Rietveld 408576698