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 10 matching lines...) Expand all Loading... | |
21 #include "base/prefs/pref_service.h" | 21 #include "base/prefs/pref_service.h" |
22 #include "base/prefs/scoped_user_pref_update.h" | 22 #include "base/prefs/scoped_user_pref_update.h" |
23 #include "base/rand_util.h" | 23 #include "base/rand_util.h" |
24 #include "base/strings/string_number_conversions.h" | 24 #include "base/strings/string_number_conversions.h" |
25 #include "base/strings/string_split.h" | 25 #include "base/strings/string_split.h" |
26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
27 #include "base/time/time.h" | 27 #include "base/time/time.h" |
28 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 28 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
29 #include "chrome/browser/autofill/validation_rules_storage_factory.h" | 29 #include "chrome/browser/autofill/validation_rules_storage_factory.h" |
30 #include "chrome/browser/browser_process.h" | 30 #include "chrome/browser/browser_process.h" |
31 #include "chrome/browser/metrics/metrics_services_manager.h" | |
31 #include "chrome/browser/profiles/profile.h" | 32 #include "chrome/browser/profiles/profile.h" |
32 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" | 33 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" |
33 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" | 34 #include "chrome/browser/ui/autofill/autofill_dialog_i18n_input.h" |
34 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" | 35 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" |
35 #include "chrome/browser/ui/autofill/data_model_wrapper.h" | 36 #include "chrome/browser/ui/autofill/data_model_wrapper.h" |
36 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h" | 37 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h" |
37 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" | 38 #include "chrome/browser/ui/autofill/new_credit_card_bubble_controller.h" |
38 #include "chrome/browser/ui/browser.h" | 39 #include "chrome/browser/ui/browser.h" |
39 #include "chrome/browser/ui/browser_finder.h" | 40 #include "chrome/browser/ui/browser_finder.h" |
40 #include "chrome/browser/ui/browser_navigator.h" | 41 #include "chrome/browser/ui/browser_navigator.h" |
(...skipping 16 matching lines...) Expand all Loading... | |
57 #include "components/autofill/core/browser/address_i18n.h" | 58 #include "components/autofill/core/browser/address_i18n.h" |
58 #include "components/autofill/core/browser/autofill_country.h" | 59 #include "components/autofill/core/browser/autofill_country.h" |
59 #include "components/autofill/core/browser/autofill_data_model.h" | 60 #include "components/autofill/core/browser/autofill_data_model.h" |
60 #include "components/autofill/core/browser/autofill_manager.h" | 61 #include "components/autofill/core/browser/autofill_manager.h" |
61 #include "components/autofill/core/browser/autofill_type.h" | 62 #include "components/autofill/core/browser/autofill_type.h" |
62 #include "components/autofill/core/browser/personal_data_manager.h" | 63 #include "components/autofill/core/browser/personal_data_manager.h" |
63 #include "components/autofill/core/browser/phone_number_i18n.h" | 64 #include "components/autofill/core/browser/phone_number_i18n.h" |
64 #include "components/autofill/core/browser/validation.h" | 65 #include "components/autofill/core/browser/validation.h" |
65 #include "components/autofill/core/common/autofill_pref_names.h" | 66 #include "components/autofill/core/common/autofill_pref_names.h" |
66 #include "components/autofill/core/common/form_data.h" | 67 #include "components/autofill/core/common/form_data.h" |
68 #include "components/metrics/metrics_service.h" | |
67 #include "components/pref_registry/pref_registry_syncable.h" | 69 #include "components/pref_registry/pref_registry_syncable.h" |
68 #include "content/public/browser/browser_thread.h" | 70 #include "content/public/browser/browser_thread.h" |
69 #include "content/public/browser/geolocation_provider.h" | 71 #include "content/public/browser/geolocation_provider.h" |
70 #include "content/public/browser/navigation_controller.h" | 72 #include "content/public/browser/navigation_controller.h" |
71 #include "content/public/browser/navigation_details.h" | 73 #include "content/public/browser/navigation_details.h" |
72 #include "content/public/browser/navigation_entry.h" | 74 #include "content/public/browser/navigation_entry.h" |
73 #include "content/public/browser/notification_service.h" | 75 #include "content/public/browser/notification_service.h" |
74 #include "content/public/browser/notification_types.h" | 76 #include "content/public/browser/notification_types.h" |
75 #include "content/public/browser/render_view_host.h" | 77 #include "content/public/browser/render_view_host.h" |
76 #include "content/public/browser/web_contents.h" | 78 #include "content/public/browser/web_contents.h" |
(...skipping 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2826 &obfuscated_gaia_id); | 2828 &obfuscated_gaia_id); |
2827 DCHECK(success); | 2829 DCHECK(success); |
2828 | 2830 |
2829 gfx::Rect window_bounds; | 2831 gfx::Rect window_bounds; |
2830 window_bounds = GetBaseWindowForWebContents(web_contents())->GetBounds(); | 2832 window_bounds = GetBaseWindowForWebContents(web_contents())->GetBounds(); |
2831 | 2833 |
2832 PrefService* user_prefs = profile_->GetPrefs(); | 2834 PrefService* user_prefs = profile_->GetPrefs(); |
2833 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); | 2835 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); |
2834 std::string accept_languages = | 2836 std::string accept_languages = |
2835 user_prefs->GetString(::prefs::kAcceptLanguages); | 2837 user_prefs->GetString(::prefs::kAcceptLanguages); |
2836 base::Time install_time = base::Time::FromTimeT( | 2838 base::Time install_time = |
2837 g_browser_process->local_state()->GetInt64(::prefs::kInstallDate)); | 2839 base::Time::FromTimeT(g_browser_process->GetMetricsServicesManager() |
2840 ->GetMetricsService() | |
Ilya Sherman
2014/07/08 03:26:33
nit: "g_browser_process->metrics_service()"
gab
2014/07/08 17:41:02
Done.
| |
2841 ->GetInstallDate()); | |
2838 | 2842 |
2839 risk::GetFingerprint( | 2843 risk::GetFingerprint( |
2840 obfuscated_gaia_id, window_bounds, web_contents(), | 2844 obfuscated_gaia_id, window_bounds, web_contents(), |
2841 chrome::VersionInfo().Version(), charset, accept_languages, install_time, | 2845 chrome::VersionInfo().Version(), charset, accept_languages, install_time, |
2842 g_browser_process->GetApplicationLocale(), GetUserAgent(), | 2846 g_browser_process->GetApplicationLocale(), GetUserAgent(), |
2843 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData, | 2847 base::Bind(&AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData, |
2844 weak_ptr_factory_.GetWeakPtr())); | 2848 weak_ptr_factory_.GetWeakPtr())); |
2845 } | 2849 } |
2846 | 2850 |
2847 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData( | 2851 void AutofillDialogControllerImpl::OnDidLoadRiskFingerprintData( |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4100 view_->UpdateButtonStrip(); | 4104 view_->UpdateButtonStrip(); |
4101 } | 4105 } |
4102 | 4106 |
4103 void AutofillDialogControllerImpl::FetchWalletCookie() { | 4107 void AutofillDialogControllerImpl::FetchWalletCookie() { |
4104 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 4108 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
4105 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 4109 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
4106 signin_helper_->StartWalletCookieValueFetch(); | 4110 signin_helper_->StartWalletCookieValueFetch(); |
4107 } | 4111 } |
4108 | 4112 |
4109 } // namespace autofill | 4113 } // namespace autofill |
OLD | NEW |