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 23 matching lines...) Expand all Loading... |
34 #include "content/public/browser/gpu_data_manager_observer.h" | 34 #include "content/public/browser/gpu_data_manager_observer.h" |
35 #include "content/public/browser/plugin_service.h" | 35 #include "content/public/browser/plugin_service.h" |
36 #include "content/public/browser/render_widget_host.h" | 36 #include "content/public/browser/render_widget_host.h" |
37 #include "content/public/browser/render_widget_host_view.h" | 37 #include "content/public/browser/render_widget_host_view.h" |
38 #include "content/public/browser/web_contents.h" | 38 #include "content/public/browser/web_contents.h" |
39 #include "content/public/common/screen_info.h" | 39 #include "content/public/common/screen_info.h" |
40 #include "content/public/common/webplugininfo.h" | 40 #include "content/public/common/webplugininfo.h" |
41 #include "device/geolocation/geolocation_provider.h" | 41 #include "device/geolocation/geolocation_provider.h" |
42 #include "device/geolocation/geoposition.h" | 42 #include "device/geolocation/geoposition.h" |
43 #include "gpu/config/gpu_info.h" | 43 #include "gpu/config/gpu_info.h" |
| 44 #include "ppapi/features/features.h" |
44 #include "third_party/WebKit/public/platform/WebRect.h" | 45 #include "third_party/WebKit/public/platform/WebRect.h" |
45 #include "ui/display/display.h" | 46 #include "ui/display/display.h" |
46 #include "ui/display/screen.h" | 47 #include "ui/display/screen.h" |
47 #include "ui/gfx/geometry/rect.h" | 48 #include "ui/gfx/geometry/rect.h" |
48 | 49 |
49 namespace autofill { | 50 namespace autofill { |
50 namespace risk { | 51 namespace risk { |
51 | 52 |
52 namespace { | 53 namespace { |
53 | 54 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 base::Bind(&FingerprintDataLoader::MaybeFillFingerprint, | 287 base::Bind(&FingerprintDataLoader::MaybeFillFingerprint, |
287 weak_ptr_factory_.GetWeakPtr())); | 288 weak_ptr_factory_.GetWeakPtr())); |
288 | 289 |
289 // Load GPU data if needed. | 290 // Load GPU data if needed. |
290 if (gpu_data_manager_->GpuAccessAllowed(NULL) && | 291 if (gpu_data_manager_->GpuAccessAllowed(NULL) && |
291 !gpu_data_manager_->IsEssentialGpuInfoAvailable()) { | 292 !gpu_data_manager_->IsEssentialGpuInfoAvailable()) { |
292 gpu_observer_.Add(gpu_data_manager_); | 293 gpu_observer_.Add(gpu_data_manager_); |
293 gpu_data_manager_->RequestCompleteGpuInfoIfNeeded(); | 294 gpu_data_manager_->RequestCompleteGpuInfoIfNeeded(); |
294 } | 295 } |
295 | 296 |
296 #if defined(ENABLE_PLUGINS) | 297 #if BUILDFLAG(ENABLE_PLUGINS) |
297 // Load plugin data. | 298 // Load plugin data. |
298 content::PluginService::GetInstance()->GetPlugins( | 299 content::PluginService::GetInstance()->GetPlugins( |
299 base::Bind(&FingerprintDataLoader::OnGotPlugins, | 300 base::Bind(&FingerprintDataLoader::OnGotPlugins, |
300 weak_ptr_factory_.GetWeakPtr())); | 301 weak_ptr_factory_.GetWeakPtr())); |
301 #else | 302 #else |
302 waiting_on_plugins_ = false; | 303 waiting_on_plugins_ = false; |
303 #endif | 304 #endif |
304 | 305 |
305 // Load font data. | 306 // Load font data. |
306 content::GetFontListAsync( | 307 content::GetFontListAsync( |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 host_view->GetRenderWidgetHost()->GetScreenInfo(&screen_info); | 476 host_view->GetRenderWidgetHost()->GetScreenInfo(&screen_info); |
476 | 477 |
477 internal::GetFingerprintInternal( | 478 internal::GetFingerprintInternal( |
478 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, | 479 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, |
479 charset, accept_languages, install_time, app_locale, user_agent, | 480 charset, accept_languages, install_time, app_locale, user_agent, |
480 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); | 481 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); |
481 } | 482 } |
482 | 483 |
483 } // namespace risk | 484 } // namespace risk |
484 } // namespace autofill | 485 } // namespace autofill |
OLD | NEW |