| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 void FingerprintDataLoader::OnGpuInfoUpdate() { | 319 void FingerprintDataLoader::OnGpuInfoUpdate() { |
| 320 if (!gpu_data_manager_->IsEssentialGpuInfoAvailable()) | 320 if (!gpu_data_manager_->IsEssentialGpuInfoAvailable()) |
| 321 return; | 321 return; |
| 322 | 322 |
| 323 gpu_observer_.Remove(gpu_data_manager_); | 323 gpu_observer_.Remove(gpu_data_manager_); |
| 324 MaybeFillFingerprint(); | 324 MaybeFillFingerprint(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 void FingerprintDataLoader::OnGotFonts(std::unique_ptr<base::ListValue> fonts) { | 327 void FingerprintDataLoader::OnGotFonts(std::unique_ptr<base::ListValue> fonts) { |
| 328 DCHECK(!fonts_); | 328 DCHECK(!fonts_); |
| 329 fonts_.reset(fonts.release()); | 329 fonts_ = std::move(fonts); |
| 330 MaybeFillFingerprint(); | 330 MaybeFillFingerprint(); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void FingerprintDataLoader::OnGotPlugins( | 333 void FingerprintDataLoader::OnGotPlugins( |
| 334 const std::vector<content::WebPluginInfo>& plugins) { | 334 const std::vector<content::WebPluginInfo>& plugins) { |
| 335 DCHECK(waiting_on_plugins_); | 335 DCHECK(waiting_on_plugins_); |
| 336 waiting_on_plugins_ = false; | 336 waiting_on_plugins_ = false; |
| 337 plugins_ = plugins; | 337 plugins_ = plugins; |
| 338 MaybeFillFingerprint(); | 338 MaybeFillFingerprint(); |
| 339 } | 339 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 host_view->GetRenderWidgetHost()->GetScreenInfo(&screen_info); | 476 host_view->GetRenderWidgetHost()->GetScreenInfo(&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 |