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 // Generating a fingerprint consists of two major steps: | 5 // Generating a fingerprint consists of two major steps: |
6 // (1) Gather all the necessary data. | 6 // (1) Gather all the necessary data. |
7 // (2) Write it into a protocol buffer. | 7 // (2) Write it into a protocol buffer. |
8 // | 8 // |
9 // Step (2) is as simple as it sounds -- it's really just a matter of copying | 9 // Step (2) is as simple as it sounds -- it's really just a matter of copying |
10 // data. Step (1) requires waiting on several asynchronous callbacks, which are | 10 // data. Step (1) requires waiting on several asynchronous callbacks, which are |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 const base::Time& install_time, | 195 const base::Time& install_time, |
196 const std::string& app_locale, | 196 const std::string& app_locale, |
197 const std::string& user_agent, | 197 const std::string& user_agent, |
198 const base::TimeDelta& timeout, | 198 const base::TimeDelta& timeout, |
199 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback); | 199 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback); |
200 | 200 |
201 private: | 201 private: |
202 virtual ~FingerprintDataLoader() {} | 202 virtual ~FingerprintDataLoader() {} |
203 | 203 |
204 // content::GpuDataManagerObserver: | 204 // content::GpuDataManagerObserver: |
205 virtual void OnGpuInfoUpdate() OVERRIDE; | 205 virtual void OnGpuInfoUpdate() override; |
206 | 206 |
207 // Callbacks for asynchronously loaded data. | 207 // Callbacks for asynchronously loaded data. |
208 void OnGotFonts(scoped_ptr<base::ListValue> fonts); | 208 void OnGotFonts(scoped_ptr<base::ListValue> fonts); |
209 void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); | 209 void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); |
210 void OnGotGeoposition(const content::Geoposition& geoposition); | 210 void OnGotGeoposition(const content::Geoposition& geoposition); |
211 | 211 |
212 // If all of the asynchronous data has been loaded, calls |callback_| with | 212 // If all of the asynchronous data has been loaded, calls |callback_| with |
213 // the fingerprint data. | 213 // the fingerprint data. |
214 void MaybeFillFingerprint(); | 214 void MaybeFillFingerprint(); |
215 | 215 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info); | 484 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info); |
485 | 485 |
486 internal::GetFingerprintInternal( | 486 internal::GetFingerprintInternal( |
487 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, | 487 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, |
488 charset, accept_languages, install_time, app_locale, user_agent, | 488 charset, accept_languages, install_time, app_locale, user_agent, |
489 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); | 489 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); |
490 } | 490 } |
491 | 491 |
492 } // namespace risk | 492 } // namespace risk |
493 } // namespace autofill | 493 } // namespace autofill |
OLD | NEW |