| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/autofill/risk/fingerprint.h" | 5 #include "chrome/browser/autofill/risk/fingerprint.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 } // namespace | 361 } // namespace |
| 362 | 362 |
| 363 void GetFingerprint( | 363 void GetFingerprint( |
| 364 int64 gaia_id, | 364 int64 gaia_id, |
| 365 const gfx::Rect& window_bounds, | 365 const gfx::Rect& window_bounds, |
| 366 const gfx::Rect& content_bounds, | 366 const gfx::Rect& content_bounds, |
| 367 const WebKit::WebScreenInfo& screen_info, | 367 const WebKit::WebScreenInfo& screen_info, |
| 368 const PrefServiceBase& prefs, | 368 const PrefServiceBase& prefs, |
| 369 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) { | 369 const base::Callback<void(scoped_ptr<Fingerprint>)>& callback) { |
| 370 // TODO(isherman): Add a DCHECK that the ToS have been accepted prior to | |
| 371 // calling into this method. Also, ensure that the UI contains a clear | |
| 372 // indication to the user as to what data will be collected. Until then, this | |
| 373 // code should not be called. | |
| 374 | |
| 375 // TODO(isherman): In order to actually be able to pass in the WebScreenInfo | |
| 376 // that's used here, we'll need to expose RenderWidgetHostImpl's | |
| 377 // GetWebScreenInfo() as part of the public RenderWidgetHost interface. | |
| 378 // We can then access it via the dialog's WebContents pointer. | |
| 379 | |
| 380 // Begin loading all of the data that we need to load asynchronously. | 370 // Begin loading all of the data that we need to load asynchronously. |
| 381 // This class is responsible for freeing its own memory. | 371 // This class is responsible for freeing its own memory. |
| 382 new FingerprintDataLoader(gaia_id, window_bounds, content_bounds, | 372 new FingerprintDataLoader(gaia_id, window_bounds, content_bounds, |
| 383 screen_info, prefs, callback); | 373 screen_info, prefs, callback); |
| 384 } | 374 } |
| 385 | 375 |
| 386 } // namespace risk | 376 } // namespace risk |
| 387 } // namespace autofill | 377 } // namespace autofill |
| OLD | NEW |