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

Unified Diff: components/autofill/content/browser/risk/fingerprint.cc

Issue 630983003: Declaring the weak_ptr_factory in proper order in src/components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | components/autofill/core/browser/autofill_external_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/risk/fingerprint.cc
diff --git a/components/autofill/content/browser/risk/fingerprint.cc b/components/autofill/content/browser/risk/fingerprint.cc
index 217cdf986b946d259d7a07184cc8521799c611c2..213819d8dbc2d2f4d4b0627ca94a106928659ace 100644
--- a/components/autofill/content/browser/risk/fingerprint.cc
+++ b/components/autofill/content/browser/risk/fingerprint.cc
@@ -247,10 +247,6 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver {
// if not all asynchronous data has been loaded.
base::OneShotTimer<FingerprintDataLoader> timeout_timer_;
- // For invalidating asynchronous callbacks that might arrive after |this|
- // instance is destroyed.
- base::WeakPtrFactory<FingerprintDataLoader> weak_ptr_factory_;
-
// The callback that will be called once all the data is available.
base::Callback<void(scoped_ptr<Fingerprint>)> callback_;
@@ -258,6 +254,10 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver {
scoped_ptr<content::GeolocationProvider::Subscription>
geolocation_subscription_;
+ // For invalidating asynchronous callbacks that might arrive after |this|
+ // instance is destroyed.
+ base::WeakPtrFactory<FingerprintDataLoader> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(FingerprintDataLoader);
};
@@ -287,8 +287,8 @@ FingerprintDataLoader::FingerprintDataLoader(
user_agent_(user_agent),
install_time_(install_time),
waiting_on_plugins_(true),
- weak_ptr_factory_(this),
- callback_(callback) {
+ callback_(callback),
+ weak_ptr_factory_(this) {
DCHECK(!install_time_.is_null());
timeout_timer_.Start(FROM_HERE, timeout,
« no previous file with comments | « AUTHORS ('k') | components/autofill/core/browser/autofill_external_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698