Cleanup: Only build extensions renderer code when extensions are enabled.
[chromium-blink-merge.git] / components / autofill / content / browser / risk / fingerprint.h
blob8ecbe9fb50e980c2e8b204a81228cac54ad4bb25
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
3 // found in the LICENSE file.
4 //
5 // Generates fingerprints appropriate for sending to the Google Wallet Risk
6 // engine, which is the fraud-detection engine used for purchases powered by
7 // Google Wallet. A fingerprint encapsulates machine and user characteristics.
8 // Because much of the data is privacy-sensitive, fingerprints should only be
9 // generated with explicit user consent, including consent to gather geolocation
10 // data.
12 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_RISK_FINGERPRINT_H_
13 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_RISK_FINGERPRINT_H_
15 #include <string>
17 #include "base/basictypes.h"
18 #include "base/callback_forward.h"
19 #include "base/memory/scoped_ptr.h"
20 #include "components/autofill/core/browser/autofill_client.h"
22 class PrefService;
24 namespace base {
25 class Time;
28 namespace content {
29 class WebContents;
32 namespace gfx {
33 class Rect;
36 namespace blink {
37 struct WebScreenInfo;
40 namespace autofill {
41 namespace risk {
43 class Fingerprint;
45 // Asynchronously calls |callback| with statistics that, collectively, provide a
46 // unique fingerprint for this (machine, user) pair, used for fraud prevention.
47 // |obfuscated_gaia_id| is an obfuscated user id for Google's authentication
48 // system. |window_bounds| should be the bounds of the containing Chrome window.
49 // |web_contents| should be the host for the page the user is interacting with.
50 // |version| is the version number of the application. |charset| is the default
51 // character set. |accept_languages| is the Accept-Languages setting.
52 // |install_time| is the absolute time of installation.
53 void GetFingerprint(
54 uint64 obfuscated_gaia_id,
55 const gfx::Rect& window_bounds,
56 content::WebContents* web_contents,
57 const std::string& version,
58 const std::string& charset,
59 const std::string& accept_languages,
60 const base::Time& install_time,
61 const std::string& app_locale,
62 const std::string& user_agent,
63 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback);
65 } // namespace risk
66 } // namespace autofill
68 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_RISK_FINGERPRINT_H_