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

Unified Diff: chrome/browser/geolocation/wifi_data_provider_chromeos.cc

Issue 3027042: Speculative fix for chromium-os:4706 - use singleton NetworkLibrary rather than create our own (Closed)
Patch Set: Rebase Created 10 years, 4 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 | « chrome/browser/geolocation/wifi_data_provider_chromeos.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/wifi_data_provider_chromeos.cc
diff --git a/chrome/browser/geolocation/wifi_data_provider_chromeos.cc b/chrome/browser/geolocation/wifi_data_provider_chromeos.cc
index a13d2f77552407a5de3cd70b39e9cf06f6f538c5..c87386dcfae4ebca7704d9f925912e7e97aecdc4 100644
--- a/chrome/browser/geolocation/wifi_data_provider_chromeos.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_chromeos.cc
@@ -85,11 +85,11 @@ WifiDataProviderCommon::WlanApiInterface*
WifiDataProviderCommon::WlanApiInterface*
WifiDataProviderChromeOs::NewWlanApi() {
- if (network_library_ == NULL) {
- network_library_.reset(chromeos::CrosLibrary::Get()->GetNetworkLibrary());
- // TODO(joth): Check net_lib loaded ok, if not return NULL.
- }
- return NewWlanApi(network_library_.get());
+ chromeos::CrosLibrary* cros_lib = chromeos::CrosLibrary::Get();
+ DCHECK(cros_lib);
+ if (!cros_lib->EnsureLoaded())
+ return NULL;
+ return NewWlanApi(cros_lib->GetNetworkLibrary());
}
PollingPolicyInterface* WifiDataProviderChromeOs::NewPollingPolicy() {
« no previous file with comments | « chrome/browser/geolocation/wifi_data_provider_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698