| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" | 32 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" |
| 33 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" | 33 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" |
| 34 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" | 34 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" |
| 35 #include "chrome/browser/ui/autofill/data_model_wrapper.h" | 35 #include "chrome/browser/ui/autofill/data_model_wrapper.h" |
| 36 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h" | 36 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h" |
| 37 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" | 37 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" |
| 38 #include "chrome/browser/ui/browser.h" | 38 #include "chrome/browser/ui/browser.h" |
| 39 #include "chrome/browser/ui/browser_finder.h" | 39 #include "chrome/browser/ui/browser_finder.h" |
| 40 #include "chrome/browser/ui/browser_navigator.h" | 40 #include "chrome/browser/ui/browser_navigator.h" |
| 41 #include "chrome/browser/ui/browser_window.h" | 41 #include "chrome/browser/ui/browser_window.h" |
| 42 #include "chrome/common/chrome_content_client.h" |
| 42 #include "chrome/common/chrome_version_info.h" | 43 #include "chrome/common/chrome_version_info.h" |
| 43 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 44 #include "chrome/common/render_messages.h" | 45 #include "chrome/common/render_messages.h" |
| 45 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
| 46 #include "components/autofill/content/browser/risk/fingerprint.h" | 47 #include "components/autofill/content/browser/risk/fingerprint.h" |
| 47 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" | 48 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" |
| 48 #include "components/autofill/content/browser/wallet/form_field_error.h" | 49 #include "components/autofill/content/browser/wallet/form_field_error.h" |
| 49 #include "components/autofill/content/browser/wallet/full_wallet.h" | 50 #include "components/autofill/content/browser/wallet/full_wallet.h" |
| 50 #include "components/autofill/content/browser/wallet/gaia_account.h" | 51 #include "components/autofill/content/browser/wallet/gaia_account.h" |
| 51 #include "components/autofill/content/browser/wallet/instrument.h" | 52 #include "components/autofill/content/browser/wallet/instrument.h" |
| (...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2707 PrefService* user_prefs = profile_->GetPrefs(); | 2708 PrefService* user_prefs = profile_->GetPrefs(); |
| 2708 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); | 2709 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); |
| 2709 std::string accept_languages = | 2710 std::string accept_languages = |
| 2710 user_prefs->GetString(::prefs::kAcceptLanguages); | 2711 user_prefs->GetString(::prefs::kAcceptLanguages); |
| 2711 base::Time install_time = base::Time::FromTimeT( | 2712 base::Time install_time = base::Time::FromTimeT( |
| 2712 g_browser_process->local_state()->GetInt64(::prefs::kInstallDate)); | 2713 g_browser_process->local_state()->GetInt64(::prefs::kInstallDate)); |
| 2713 | 2714 |
| 2714 risk::GetFingerprint( | 2715 risk::GetFingerprint( |
| 2715 obfuscated_gaia_id, window_bounds, *web_contents(), | 2716 obfuscated_gaia_id, window_bounds, *web_contents(), |
| 2716 chrome::VersionInfo().Version(), charset, accept_languages, install_time, | 2717 chrome::VersionInfo().Version(), charset, accept_languages, install_time, |
| 2717 g_browser_process->GetApplicationLocale(), | 2718 g_browser_process->GetApplicationLocale(), GetUserAgent(), |
| 2718 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData, | 2719 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData, |
| 2719 weak_ptr_factory_.GetWeakPtr())); | 2720 weak_ptr_factory_.GetWeakPtr())); |
| 2720 } | 2721 } |
| 2721 | 2722 |
| 2722 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData( | 2723 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData( |
| 2723 scoped_ptr<risk::Fingerprint> fingerprint) { | 2724 scoped_ptr<risk::Fingerprint> fingerprint) { |
| 2724 DCHECK(AreLegalDocumentsCurrent()); | 2725 DCHECK(AreLegalDocumentsCurrent()); |
| 2725 | 2726 |
| 2726 std::string proto_data; | 2727 std::string proto_data; |
| 2727 fingerprint->SerializeToString(&proto_data); | 2728 fingerprint->SerializeToString(&proto_data); |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3807 view_->UpdateButtonStrip(); | 3808 view_->UpdateButtonStrip(); |
| 3808 } | 3809 } |
| 3809 | 3810 |
| 3810 void AutofillDialogControllerImpl::FetchWalletCookie() { | 3811 void AutofillDialogControllerImpl::FetchWalletCookie() { |
| 3811 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 3812 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
| 3812 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 3813 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
| 3813 signin_helper_->StartWalletCookieValueFetch(); | 3814 signin_helper_->StartWalletCookieValueFetch(); |
| 3814 } | 3815 } |
| 3815 | 3816 |
| 3816 } // namespace autofill | 3817 } // namespace autofill |
| OLD | NEW |