OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/autofill/risk_util.h" | 5 #include "chrome/browser/autofill/risk_util.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "chrome/browser/apps/app_window_registry_util.h" | 11 #include "chrome/browser/apps/app_window_registry_util.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/common/chrome_content_client.h" | 15 #include "chrome/common/chrome_content_client.h" |
16 #include "chrome/common/chrome_version_info.h" | |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
18 #include "components/autofill/content/browser/risk/fingerprint.h" | 17 #include "components/autofill/content/browser/risk/fingerprint.h" |
19 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" | 18 #include "components/autofill/content/browser/risk/proto/fingerprint.pb.h" |
20 #include "components/metrics/metrics_service.h" | 19 #include "components/metrics/metrics_service.h" |
| 20 #include "components/version_info/version_info.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 | 22 |
23 #if !defined(OS_ANDROID) | 23 #if !defined(OS_ANDROID) |
24 #include "chrome/browser/ui/browser_finder.h" | 24 #include "chrome/browser/ui/browser_finder.h" |
25 #include "chrome/browser/ui/browser_window.h" | 25 #include "chrome/browser/ui/browser_window.h" |
26 #include "extensions/browser/app_window/app_window.h" | 26 #include "extensions/browser/app_window/app_window.h" |
27 #include "extensions/browser/app_window/native_app_window.h" | 27 #include "extensions/browser/app_window/native_app_window.h" |
28 #include "ui/base/base_window.h" | 28 #include "ui/base/base_window.h" |
29 #endif | 29 #endif |
30 | 30 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 const PrefService* user_prefs = | 74 const PrefService* user_prefs = |
75 Profile::FromBrowserContext(web_contents->GetBrowserContext()) | 75 Profile::FromBrowserContext(web_contents->GetBrowserContext()) |
76 ->GetPrefs(); | 76 ->GetPrefs(); |
77 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); | 77 std::string charset = user_prefs->GetString(::prefs::kDefaultCharset); |
78 std::string accept_languages = | 78 std::string accept_languages = |
79 user_prefs->GetString(::prefs::kAcceptLanguages); | 79 user_prefs->GetString(::prefs::kAcceptLanguages); |
80 base::Time install_time = base::Time::FromTimeT( | 80 base::Time install_time = base::Time::FromTimeT( |
81 g_browser_process->metrics_service()->GetInstallDate()); | 81 g_browser_process->metrics_service()->GetInstallDate()); |
82 | 82 |
83 risk::GetFingerprint(obfuscated_gaia_id, window_bounds, web_contents, | 83 risk::GetFingerprint(obfuscated_gaia_id, window_bounds, web_contents, |
84 chrome::VersionInfo().Version(), charset, | 84 version_info::GetVersionNumber(), charset, |
85 accept_languages, install_time, | 85 accept_languages, install_time, |
86 g_browser_process->GetApplicationLocale(), | 86 g_browser_process->GetApplicationLocale(), |
87 GetUserAgent(), base::Bind(PassRiskData, callback)); | 87 GetUserAgent(), base::Bind(PassRiskData, callback)); |
88 } | 88 } |
89 | 89 |
90 } // namespace autofill | 90 } // namespace autofill |
OLD | NEW |