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

Side by Side Diff: components/autofill/content/browser/risk/fingerprint.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « components/autofill/content/browser/BUILD.gn ('k') | components/content_settings/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698