Commit 59b96827 authored by anujk.sharma's avatar anujk.sharma Committed by Commit bot

Code refactor related to WeakPtrFactory in src/components module

Changing in the intialization order of WeakPtrFactory in src/components module
such that all member variables should appear before the WeakPtrFactory
to ensure that any WeakPtrs to Controller are invalidated before its members
variable's destructors are executed, rendering them invalid.

BUG=303818

Review URL: https://codereview.chromium.org/573623002

Cr-Commit-Position: refs/heads/master@{#295084}
parent 96256bfe
......@@ -66,11 +66,11 @@ class NetworkMetricsProvider
// net::GetWifiPHYLayerProtocol.
net::WifiPHYLayerProtocol wifi_phy_layer_protocol_;
base::WeakPtrFactory<NetworkMetricsProvider> weak_ptr_factory_;
// Helper object for retrieving connected wifi access point information.
scoped_ptr<WifiAccessPointInfoProvider> wifi_access_point_info_provider_;
base::WeakPtrFactory<NetworkMetricsProvider> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(NetworkMetricsProvider);
};
......
......@@ -229,10 +229,10 @@ class WebCacheManager : public content::NotificationObserver {
// recently than they have been active.
std::set<int> inactive_renderers_;
base::WeakPtrFactory<WebCacheManager> weak_factory_;
content::NotificationRegistrar registrar_;
base::WeakPtrFactory<WebCacheManager> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WebCacheManager);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment