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

Unified Diff: components/wifi/wifi_service_win.cc

Issue 371113002: Fixes for re-enabling more MSVC level 4 warnings: components/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix compile failure Created 6 years, 5 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 | « components/url_matcher/substring_set_matcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/wifi/wifi_service_win.cc
diff --git a/components/wifi/wifi_service_win.cc b/components/wifi/wifi_service_win.cc
index 523013e88ca0da6a1a122be8ecf86fa9dc75c8a5..4bc380072ca9ed4eefc5d6a5cc5a5822e48ce616 100644
--- a/components/wifi/wifi_service_win.cc
+++ b/components/wifi/wifi_service_win.cc
@@ -1466,13 +1466,14 @@ Frequency WiFiServiceImpl::GetFrequencyToConnect(
const std::string& network_guid) const {
// Check whether desired frequency is set in |connect_properties_|.
const base::DictionaryValue* properties;
- const base::DictionaryValue* wifi;
- int frequency;
- if (connect_properties_.GetDictionaryWithoutPathExpansion(
- network_guid, &properties) &&
- properties->GetDictionary(onc::network_type::kWiFi, &wifi) &&
- wifi->GetInteger(onc::wifi::kFrequency, &frequency)) {
- return GetNormalizedFrequency(frequency);
+ if (connect_properties_.GetDictionaryWithoutPathExpansion(network_guid,
+ &properties)) {
+ const base::DictionaryValue* wifi;
+ if (properties->GetDictionary(onc::network_type::kWiFi, &wifi)) {
+ int frequency;
+ if (wifi->GetInteger(onc::wifi::kFrequency, &frequency))
+ return GetNormalizedFrequency(frequency);
+ }
}
return kFrequencyAny;
}
« no previous file with comments | « components/url_matcher/substring_set_matcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698