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

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

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 26 matching lines...) Expand all
37 #include "content/public/browser/web_contents_view.h" 37 #include "content/public/browser/web_contents_view.h"
38 #include "content/public/common/content_client.h" 38 #include "content/public/common/content_client.h"
39 #include "content/public/common/geoposition.h" 39 #include "content/public/common/geoposition.h"
40 #include "content/public/common/webplugininfo.h" 40 #include "content/public/common/webplugininfo.h"
41 #include "gpu/config/gpu_info.h" 41 #include "gpu/config/gpu_info.h"
42 #include "third_party/WebKit/public/platform/WebRect.h" 42 #include "third_party/WebKit/public/platform/WebRect.h"
43 #include "third_party/WebKit/public/platform/WebScreenInfo.h" 43 #include "third_party/WebKit/public/platform/WebScreenInfo.h"
44 #include "ui/gfx/rect.h" 44 #include "ui/gfx/rect.h"
45 #include "ui/gfx/screen.h" 45 #include "ui/gfx/screen.h"
46 46
47 using WebKit::WebScreenInfo; 47 using blink::WebScreenInfo;
48 48
49 namespace autofill { 49 namespace autofill {
50 namespace risk { 50 namespace risk {
51 51
52 namespace { 52 namespace {
53 53
54 const int32 kFingerprinterVersion = 1; 54 const int32 kFingerprinterVersion = 1;
55 55
56 // Maximum amount of time, in seconds, to wait for loading asynchronous 56 // Maximum amount of time, in seconds, to wait for loading asynchronous
57 // fingerprint data. 57 // fingerprint data.
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 499
500 } // namespace 500 } // namespace
501 501
502 namespace internal { 502 namespace internal {
503 503
504 void GetFingerprintInternal( 504 void GetFingerprintInternal(
505 uint64 obfuscated_gaia_id, 505 uint64 obfuscated_gaia_id,
506 const gfx::Rect& window_bounds, 506 const gfx::Rect& window_bounds,
507 const gfx::Rect& content_bounds, 507 const gfx::Rect& content_bounds,
508 const WebKit::WebScreenInfo& screen_info, 508 const blink::WebScreenInfo& screen_info,
509 const std::string& version, 509 const std::string& version,
510 const std::string& charset, 510 const std::string& charset,
511 const std::string& accept_languages, 511 const std::string& accept_languages,
512 const base::Time& install_time, 512 const base::Time& install_time,
513 const std::string& app_locale, 513 const std::string& app_locale,
514 const base::TimeDelta& timeout, 514 const base::TimeDelta& timeout,
515 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) { 515 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) {
516 // Begin loading all of the data that we need to load asynchronously. 516 // Begin loading all of the data that we need to load asynchronously.
517 // This class is responsible for freeing its own memory. 517 // This class is responsible for freeing its own memory.
518 new FingerprintDataLoader(obfuscated_gaia_id, window_bounds, content_bounds, 518 new FingerprintDataLoader(obfuscated_gaia_id, window_bounds, content_bounds,
519 screen_info, version, charset, accept_languages, 519 screen_info, version, charset, accept_languages,
520 install_time, app_locale, timeout, callback); 520 install_time, app_locale, timeout, callback);
521 } 521 }
522 522
523 } // namespace internal 523 } // namespace internal
524 524
525 void GetFingerprint( 525 void GetFingerprint(
526 uint64 obfuscated_gaia_id, 526 uint64 obfuscated_gaia_id,
527 const gfx::Rect& window_bounds, 527 const gfx::Rect& window_bounds,
528 const content::WebContents& web_contents, 528 const content::WebContents& web_contents,
529 const std::string& version, 529 const std::string& version,
530 const std::string& charset, 530 const std::string& charset,
531 const std::string& accept_languages, 531 const std::string& accept_languages,
532 const base::Time& install_time, 532 const base::Time& install_time,
533 const std::string& app_locale, 533 const std::string& app_locale,
534 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) { 534 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) {
535 gfx::Rect content_bounds; 535 gfx::Rect content_bounds;
536 web_contents.GetView()->GetContainerBounds(&content_bounds); 536 web_contents.GetView()->GetContainerBounds(&content_bounds);
537 537
538 WebKit::WebScreenInfo screen_info; 538 blink::WebScreenInfo screen_info;
539 content::RenderWidgetHostView* host_view = 539 content::RenderWidgetHostView* host_view =
540 web_contents.GetRenderWidgetHostView(); 540 web_contents.GetRenderWidgetHostView();
541 if (host_view) 541 if (host_view)
542 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info); 542 host_view->GetRenderWidgetHost()->GetWebScreenInfo(&screen_info);
543 543
544 internal::GetFingerprintInternal( 544 internal::GetFingerprintInternal(
545 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version, 545 obfuscated_gaia_id, window_bounds, content_bounds, screen_info, version,
546 charset, accept_languages, install_time, app_locale, 546 charset, accept_languages, install_time, app_locale,
547 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback); 547 base::TimeDelta::FromSeconds(kTimeoutSeconds), callback);
548 } 548 }
549 549
550 } // namespace risk 550 } // namespace risk
551 } // namespace autofill 551 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/browser/risk/fingerprint.h ('k') | components/autofill/content/renderer/autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698