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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 // interacting with this dialog. 554 // interacting with this dialog.
555 AutofillMetrics::DialogInitialUserStateMetric GetInitialUserState() const; 555 AutofillMetrics::DialogInitialUserStateMetric GetInitialUserState() const;
556 556
557 // Shows an educational bubble if a new credit card was saved or the first few 557 // Shows an educational bubble if a new credit card was saved or the first few
558 // times an Online Wallet fronting card was generated. 558 // times an Online Wallet fronting card was generated.
559 void MaybeShowCreditCardBubble(); 559 void MaybeShowCreditCardBubble();
560 560
561 // Called when the delay for enabling the submit button ends. 561 // Called when the delay for enabling the submit button ends.
562 void OnSubmitButtonDelayEnd(); 562 void OnSubmitButtonDelayEnd();
563 563
564 // Initiates a fetch of the user's current Wallet cookie and Google username.
565 void FetchWalletCookieAndUserName();
566
564 // The |profile| for |contents_|. 567 // The |profile| for |contents_|.
565 Profile* const profile_; 568 Profile* const profile_;
566 569
567 // For logging UMA metrics. 570 // For logging UMA metrics.
568 const AutofillMetrics metric_logger_; 571 const AutofillMetrics metric_logger_;
569 base::Time dialog_shown_timestamp_; 572 base::Time dialog_shown_timestamp_;
570 AutofillMetrics::DialogInitialUserStateMetric initial_user_state_; 573 AutofillMetrics::DialogInitialUserStateMetric initial_user_state_;
571 574
572 FormStructure form_structure_; 575 FormStructure form_structure_;
573 576
574 // Whether the URL visible to the user when this dialog was requested to be 577 // Whether the URL visible to the user when this dialog was requested to be
575 // invoked is the same as |source_url_|. 578 // invoked is the same as |source_url_|.
576 bool invoked_from_same_origin_; 579 bool invoked_from_same_origin_;
577 580
578 // The URL of the invoking site. 581 // The URL of the invoking site.
579 GURL source_url_; 582 GURL source_url_;
580 583
581 // The callback via which we return the collected data. 584 // The callback via which we return the collected data.
582 base::Callback<void(const FormStructure*)> callback_; 585 base::Callback<void(const FormStructure*)> callback_;
583 586
584 // The AccountChooserModel acts as the MenuModel for the account chooser, 587 // The AccountChooserModel acts as the MenuModel for the account chooser,
585 // and also tracks which data source the dialog is using. 588 // and also tracks which data source the dialog is using.
586 AccountChooserModel account_chooser_model_; 589 AccountChooserModel account_chooser_model_;
587 590
588 // The sign-in helper to fetch the user info and perform passive sign-in. 591 // The sign-in helper to fetch the user's Wallet cookie and to perform passive
589 // The helper is set only during fetch/sign-in, and NULL otherwise. 592 // sign-in. The helper is set only during fetch/sign-in, and NULL otherwise.
590 scoped_ptr<wallet::WalletSigninHelper> signin_helper_; 593 scoped_ptr<wallet::WalletSigninHelper> signin_helper_;
591 594
595 // The sign-in helper to fetch the user's human-readable username. The helper
596 // is set only while fetching the username, and NULL otherwise.
597 scoped_ptr<wallet::WalletSigninHelper> username_fetcher_;
598
592 // A client to talk to the Online Wallet API. 599 // A client to talk to the Online Wallet API.
593 wallet::WalletClient wallet_client_; 600 wallet::WalletClient wallet_client_;
594 601
595 // Recently received items retrieved via |wallet_client_|. 602 // Recently received items retrieved via |wallet_client_|.
596 scoped_ptr<wallet::WalletItems> wallet_items_; 603 scoped_ptr<wallet::WalletItems> wallet_items_;
597 scoped_ptr<wallet::FullWallet> full_wallet_; 604 scoped_ptr<wallet::FullWallet> full_wallet_;
598 605
599 // The default active instrument and shipping address object IDs as of the 606 // The default active instrument and shipping address object IDs as of the
600 // last time Wallet items were fetched. These variables are only set 607 // last time Wallet items were fetched. These variables are only set
601 // (i.e. non-empty) when the Wallet items are being re-fetched. 608 // (i.e. non-empty) when the Wallet items are being re-fetched.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 746
740 // A username string we display in the card scrambling/generated overlay. 747 // A username string we display in the card scrambling/generated overlay.
741 base::string16 submitted_cardholder_name_; 748 base::string16 submitted_cardholder_name_;
742 749
743 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 750 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
744 }; 751 };
745 752
746 } // namespace autofill 753 } // namespace autofill
747 754
748 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 755 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698