Chromium Code Reviews| Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| index 83b4094c4f15b266f25b9ed15e484b5eef5aac8b..2c167a8e4cdd95eb33519e563a6adca1aeed91fe 100644 |
| --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| @@ -6,7 +6,9 @@ |
| #include <string> |
| +#include "base/bind.h" |
| #include "base/logging.h" |
| +#include "base/prefs/pref_service.h" |
| #include "base/string_number_conversions.h" |
| #include "base/string_split.h" |
| #include "base/string_util.h" |
| @@ -16,6 +18,8 @@ |
| #include "chrome/browser/autofill/autofill_type.h" |
| #include "chrome/browser/autofill/personal_data_manager.h" |
| #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| +#include "chrome/browser/autofill/risk/fingerprint.h" |
| +#include "chrome/browser/autofill/risk/proto/fingerprint.pb.h" |
| #include "chrome/browser/autofill/validation.h" |
| #include "chrome/browser/autofill/wallet/full_wallet.h" |
| #include "chrome/browser/autofill/wallet/wallet_items.h" |
| @@ -23,6 +27,9 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/autofill/autofill_dialog_view.h" |
| #include "chrome/browser/ui/autofill/data_model_wrapper.h" |
| +#include "chrome/browser/ui/browser.h" |
| +#include "chrome/browser/ui/browser_finder.h" |
| +#include "chrome/browser/ui/browser_window.h" |
| #include "chrome/common/form_data.h" |
| #include "content/public/browser/navigation_controller.h" |
| #include "content/public/browser/navigation_details.h" |
| @@ -142,7 +149,8 @@ AutofillDialogControllerImpl::AutofillDialogControllerImpl( |
| ALLOW_THIS_IN_INITIALIZER_LIST(suggested_cc_(this)), |
| ALLOW_THIS_IN_INITIALIZER_LIST(suggested_billing_(this)), |
| ALLOW_THIS_IN_INITIALIZER_LIST(suggested_shipping_(this)), |
| - section_showing_popup_(SECTION_BILLING) { |
| + section_showing_popup_(SECTION_BILLING), |
| + ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { |
| // TODO(estade): |this| should observe PersonalDataManager. |
| // TODO(estade): remove duplicates from |form|? |
| @@ -1082,4 +1090,29 @@ void AutofillDialogControllerImpl::HidePopup() { |
| popup_controller_->Hide(); |
| } |
| +void AutofillDialogControllerImpl::LoadRiskFingerprintData() { |
| + // TODO(dbeam): Add a DCHECK that the ToS have been accepted prior to |
|
Evan Stade
2013/02/19 21:18:18
due to the sensitivity of the issue, perhaps somet
Ilya Sherman
2013/02/20 00:05:19
Do you mean something like a CHECK(), or handling
|
| + // calling into this method. Also, ensure that the UI contains a clear |
| + // indication to the user as to what data will be collected. Until then, this |
| + // code should not be called. |
| + |
| + int64 gaia_id = 0; |
| + bool success = |
| + base::StringToInt64(wallet_items_->obfuscated_gaia_id(), &gaia_id); |
| + DCHECK(success); |
| + |
| + gfx::Rect window_bounds = |
| + chrome::FindBrowserWithWebContents(web_contents())->window()->GetBounds(); |
| + |
| + risk::GetFingerprint( |
| + gaia_id, window_bounds, *web_contents(), *profile_->GetPrefs(), |
| + base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData, |
| + weak_ptr_factory_.GetWeakPtr())); |
| +} |
| + |
| +void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData( |
| + scoped_ptr<risk::Fingerprint> fingerprint) { |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| } // namespace autofill |