| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 const std::string& version, | 471 const std::string& version, |
| 472 const std::string& charset, | 472 const std::string& charset, |
| 473 const std::string& accept_languages, | 473 const std::string& accept_languages, |
| 474 const base::Time& install_time, | 474 const base::Time& install_time, |
| 475 const std::string& app_locale, | 475 const std::string& app_locale, |
| 476 const std::string& user_agent, | 476 const std::string& user_agent, |
| 477 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) { | 477 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) { |
| 478 gfx::Rect content_bounds = web_contents->GetContainerBounds(); | 478 gfx::Rect content_bounds = web_contents->GetContainerBounds(); |
| 479 | 479 |
| 480 blink::WebScreenInfo screen_info; | 480 blink::WebScreenInfo screen_info; |
| 481 content::RenderWidgetHostView* host_view = | 481 const content::RenderWidgetHostView* host_view = |
| 482 web_contents->GetRenderWidgetHostView(); | 482 web_contents->GetRenderWidgetHostView(); |
| 483 if (host_view) | 483 if (host_view) |
| 484 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info); | 484 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info); |
| 485 | 485 |
| 486 internal::GetFingerprintInternal( | 486 internal::GetFingerprintInternal( |
| 487 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, | 487 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, |
| 488 charset, accept_languages, install_time, app_locale, user_agent, | 488 charset, accept_languages, install_time, app_locale, user_agent, |
| 489 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); | 489 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); |
| 490 } | 490 } |
| 491 | 491 |
| 492 } // namespace risk | 492 } // namespace risk |
| 493 } // namespace autofill | 493 } // namespace autofill |
| OLD | NEW |