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 0394d0f730607e4aad128f1c54256b08faba2b68..3c6548c10d04d0136a7c86b77cfecdb86a12b3b8 100644 |
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h |
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h |
@@ -9,6 +9,7 @@ |
#include <vector> |
#include "base/callback.h" |
+#include "base/gtest_prod_util.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "base/string16.h" |
@@ -253,7 +254,21 @@ class AutofillDialogControllerImpl : public AutofillDialogController, |
// Exposed and virtual for testing. |
virtual bool IsFirstRun() const; |
+ // Asks risk module to asynchronously load fingerprint data. Data will be |
+ // returned via |OnDidLoadRiskFingerprintData()|. Exposed for testing. |
+ virtual void LoadRiskFingerprintData(); |
+ |
+ // Basically exists for testing, which is why |fingerprint| is a pointer |
+ // rather than const-ref (as it can be NULL this way). |
+ virtual void SerializeFingerprint(risk::Fingerprint* fingerprint, |
+ std::string* data); |
+ |
private: |
+ FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest, |
+ RiskLoadsWithoutPendingLegalDocuments); |
+ FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest, |
+ RiskLoadsAfterAcceptingLegalDocuments); |
+ |
// Whether or not the current request wants credit info back. |
bool RequestingCreditCardInfo() const; |
@@ -360,9 +375,7 @@ class AutofillDialogControllerImpl : public AutofillDialogController, |
// Hides |popup_controller_|'s popup view, if it exists. |
void HidePopup(); |
- // Asks risk module to asynchronously load fingerprint data. Data will be |
- // returned via OnDidLoadRiskFingerprintData. |
- void LoadRiskFingerprintData(); |
+ // Called when loading of risk fingerprint data is done. |
void OnDidLoadRiskFingerprintData(scoped_ptr<risk::Fingerprint> fingerprint); |
// Whether the user has chosen to enter all new data in |section|. This |
@@ -479,6 +492,10 @@ class AutofillDialogControllerImpl : public AutofillDialogController, |
scoped_ptr<wallet::WalletItems> wallet_items_; |
scoped_ptr<wallet::FullWallet> full_wallet_; |
+ // Local machine signals to pass along on each request to trigger (or |
+ // discourage) risk challenges; sent if the user is up to date on legal docs. |
+ std::string risk_data_; |
+ |
// The text to display when the user is accepting new terms of service, etc. |
string16 legal_documents_text_; |
// The ranges within |legal_documents_text_| to linkify. |
@@ -534,6 +551,9 @@ class AutofillDialogControllerImpl : public AutofillDialogController, |
// Whether this is the first time this profile has seen the Autofill dialog. |
bool is_first_run_; |
+ // Whether a user's legal documents are up to date. |
+ bool legal_documents_are_current_; |
+ |
// True after the user first accepts the dialog and presses "Submit". May |
// continue to be true while processing required actions. |
bool is_submitting_; |