OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_AUTOFILL_BROWSER_RISK_FINGERPRINT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_RISK_FINGERPRINT_H_ |
6 #define COMPONENTS_AUTOFILL_BROWSER_RISK_FINGERPRINT_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_RISK_FINGERPRINT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 struct WebScreenInfo; | 30 struct WebScreenInfo; |
31 } | 31 } |
32 | 32 |
33 namespace autofill { | 33 namespace autofill { |
34 namespace risk { | 34 namespace risk { |
35 | 35 |
36 class Fingerprint; | 36 class Fingerprint; |
37 | 37 |
38 // Asynchronously calls |callback| with statistics that, collectively, provide a | 38 // Asynchronously calls |callback| with statistics that, collectively, provide a |
39 // unique fingerprint for this (machine, user) pair, used for fraud prevention. | 39 // unique fingerprint for this (machine, user) pair, used for fraud prevention. |
40 // |gaia_id| should be the user id for Google's authentication system. | 40 // |obfuscated_gaia_id| is an obfuscated user id for Google's authentication |
41 // |window_bounds| should be the bounds of the containing Chrome window. | 41 // system. |window_bounds| should be the bounds of the containing Chrome window. |
42 // |web_contents| should be the host for the page the user is interacting with. | 42 // |web_contents| should be the host for the page the user is interacting with. |
43 // |version| is the version number of the application. | 43 // |version| is the version number of the application. |charset| is the default |
44 // |charset| is the default character set. | 44 // character set. |accept_languages| is the Accept-Languages setting. |
45 // |accept_languages| is the Accept-Languages setting. | |
46 // |install_time| is the absolute time of installation. | 45 // |install_time| is the absolute time of installation. |
47 void GetFingerprint( | 46 void GetFingerprint( |
48 int64 gaia_id, | 47 uint64 obfuscated_gaia_id, |
49 const gfx::Rect& window_bounds, | 48 const gfx::Rect& window_bounds, |
50 const content::WebContents& web_contents, | 49 const content::WebContents& web_contents, |
51 const std::string& version, | 50 const std::string& version, |
52 const std::string& charset, | 51 const std::string& charset, |
53 const std::string& accept_languages, | 52 const std::string& accept_languages, |
54 const base::Time& install_time, | 53 const base::Time& install_time, |
55 DialogType dialog_type, | 54 DialogType dialog_type, |
56 const std::string& app_locale, | 55 const std::string& app_locale, |
57 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback); | 56 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback); |
58 | 57 |
59 // Exposed for testing: | 58 // Exposed for testing: |
60 namespace internal { | 59 namespace internal { |
61 | 60 |
62 void GetFingerprintInternal( | 61 void GetFingerprintInternal( |
63 int64 gaia_id, | 62 uint64 obfuscated_gaia_id, |
64 const gfx::Rect& window_bounds, | 63 const gfx::Rect& window_bounds, |
65 const gfx::Rect& content_bounds, | 64 const gfx::Rect& content_bounds, |
66 const WebKit::WebScreenInfo& screen_info, | 65 const WebKit::WebScreenInfo& screen_info, |
67 const std::string& version, | 66 const std::string& version, |
68 const std::string& charset, | 67 const std::string& charset, |
69 const std::string& accept_languages, | 68 const std::string& accept_languages, |
70 const base::Time& install_time, | 69 const base::Time& install_time, |
71 DialogType dialog_type, | 70 DialogType dialog_type, |
72 const std::string& app_locale, | 71 const std::string& app_locale, |
73 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback); | 72 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback); |
74 | 73 |
75 } // namespace internal | 74 } // namespace internal |
76 | 75 |
77 } // namespace risk | 76 } // namespace risk |
78 } // namespace autofill | 77 } // namespace autofill |
79 | 78 |
80 #endif // COMPONENTS_AUTOFILL_BROWSER_RISK_FINGERPRINT_H_ | 79 #endif // COMPONENTS_AUTOFILL_BROWSER_RISK_FINGERPRINT_H_ |
OLD | NEW |