Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: components/autofill/content/browser/risk/fingerprint.cc

Issue 534043002: Add bits to indicate which parts of GPUInfo are collected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gpu/gpu_feature_checker.cc ('k') | content/browser/gpu/gpu_data_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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?
« no previous file with comments | « chrome/browser/gpu/gpu_feature_checker.cc ('k') | content/browser/gpu/gpu_data_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698