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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 const base::Time install_time_; | 230 const base::Time install_time_; |
231 | 231 |
232 // Data that will be loaded asynchronously. | 232 // Data that will be loaded asynchronously. |
233 scoped_ptr<base::ListValue> fonts_; | 233 scoped_ptr<base::ListValue> fonts_; |
234 std::vector<content::WebPluginInfo> plugins_; | 234 std::vector<content::WebPluginInfo> plugins_; |
235 bool waiting_on_plugins_; | 235 bool waiting_on_plugins_; |
236 content::Geoposition geoposition_; | 236 content::Geoposition geoposition_; |
237 | 237 |
238 // Timer to enforce a maximum timeout before the |callback_| is called, even | 238 // Timer to enforce a maximum timeout before the |callback_| is called, even |
239 // if not all asynchronous data has been loaded. | 239 // if not all asynchronous data has been loaded. |
240 base::OneShotTimer<FingerprintDataLoader> timeout_timer_; | 240 base::OneShotTimer timeout_timer_; |
241 | 241 |
242 // The callback that will be called once all the data is available. | 242 // The callback that will be called once all the data is available. |
243 base::Callback<void(scoped_ptr<Fingerprint>)> callback_; | 243 base::Callback<void(scoped_ptr<Fingerprint>)> callback_; |
244 | 244 |
245 // The callback used as an "observer" of the GeolocationProvider. | 245 // The callback used as an "observer" of the GeolocationProvider. |
246 scoped_ptr<content::GeolocationProvider::Subscription> | 246 scoped_ptr<content::GeolocationProvider::Subscription> |
247 geolocation_subscription_; | 247 geolocation_subscription_; |
248 | 248 |
249 // For invalidating asynchronous callbacks that might arrive after |this| | 249 // For invalidating asynchronous callbacks that might arrive after |this| |
250 // instance is destroyed. | 250 // instance is destroyed. |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info); | 476 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info); |
477 | 477 |
478 internal::GetFingerprintInternal( | 478 internal::GetFingerprintInternal( |
479 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, | 479 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, |
480 charset, accept_languages, install_time, app_locale, user_agent, | 480 charset, accept_languages, install_time, app_locale, user_agent, |
481 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); | 481 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); |
482 } | 482 } |
483 | 483 |
484 } // namespace risk | 484 } // namespace risk |
485 } // namespace autofill | 485 } // namespace autofill |
OLD | NEW |