| Index: components/autofill/content/browser/risk/fingerprint.cc
|
| diff --git a/components/autofill/content/browser/risk/fingerprint.cc b/components/autofill/content/browser/risk/fingerprint.cc
|
| index fb516c5a54dbe335fdb6e0b1d5b94b40d7af9ab4..217cdf986b946d259d7a07184cc8521799c611c2 100644
|
| --- a/components/autofill/content/browser/risk/fingerprint.cc
|
| +++ b/components/autofill/content/browser/risk/fingerprint.cc
|
| @@ -159,12 +159,13 @@ void AddCpuInfoToFingerprint(Fingerprint::MachineCharacteristics* machine) {
|
| }
|
|
|
| // Writes info about the machine's GPU into the |machine|.
|
| -void AddGpuInfoToFingerprint(Fingerprint::MachineCharacteristics* machine) {
|
| - const gpu::GPUInfo& gpu_info =
|
| - content::GpuDataManager::GetInstance()->GetGPUInfo();
|
| - if (!gpu_info.finalized)
|
| +void AddGpuInfoToFingerprint(Fingerprint::MachineCharacteristics* machine,
|
| + const content::GpuDataManager& gpu_data_manager) {
|
| + if (!gpu_data_manager.IsEssentialGpuInfoAvailable())
|
| return;
|
|
|
| + const gpu::GPUInfo gpu_info = gpu_data_manager.GetGPUInfo();
|
| +
|
| Fingerprint::MachineCharacteristics::Graphics* graphics =
|
| machine->mutable_graphics_card();
|
| graphics->set_vendor_id(gpu_info.gpu.vendor_id);
|
| @@ -296,7 +297,7 @@ FingerprintDataLoader::FingerprintDataLoader(
|
|
|
| // Load GPU data if needed.
|
| if (gpu_data_manager_->GpuAccessAllowed(NULL) &&
|
| - !gpu_data_manager_->IsCompleteGpuInfoAvailable()) {
|
| + !gpu_data_manager_->IsEssentialGpuInfoAvailable()) {
|
| gpu_observer_.Add(gpu_data_manager_);
|
| gpu_data_manager_->RequestCompleteGpuInfoIfNeeded();
|
| }
|
| @@ -324,7 +325,7 @@ FingerprintDataLoader::FingerprintDataLoader(
|
| }
|
|
|
| void FingerprintDataLoader::OnGpuInfoUpdate() {
|
| - if (!gpu_data_manager_->IsCompleteGpuInfoAvailable())
|
| + if (!gpu_data_manager_->IsEssentialGpuInfoAvailable())
|
| return;
|
|
|
| gpu_observer_.Remove(gpu_data_manager_);
|
| @@ -362,7 +363,7 @@ void FingerprintDataLoader::MaybeFillFingerprint() {
|
| // fill the fingerprint and clean up.
|
| if (!timeout_timer_.IsRunning() ||
|
| ((!gpu_data_manager_->GpuAccessAllowed(NULL) ||
|
| - gpu_data_manager_->IsCompleteGpuInfoAvailable()) &&
|
| + gpu_data_manager_->IsEssentialGpuInfoAvailable()) &&
|
| fonts_ &&
|
| !waiting_on_plugins_ &&
|
| (geoposition_.Validate() ||
|
| @@ -395,7 +396,7 @@ void FingerprintDataLoader::FillFingerprint() {
|
| AddAcceptLanguagesToFingerprint(accept_languages_, machine);
|
| AddScreenInfoToFingerprint(screen_info_, machine);
|
| AddCpuInfoToFingerprint(machine);
|
| - AddGpuInfoToFingerprint(machine);
|
| + AddGpuInfoToFingerprint(machine, *gpu_data_manager_);
|
|
|
| // TODO(isherman): Record the user_and_device_name_hash.
|
| // TODO(isherman): Record the partition size of the hard drives?
|
|
|