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

Side by Side Diff: content/browser/geolocation/network_location_request.cc

Issue 2101943004: content: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase/update Created 4 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 unified diff | Download patch
OLDNEW
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 "content/browser/geolocation/network_location_request.h" 5 #include "content/browser/geolocation/network_location_request.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (wifi_data.access_point_data.empty()) 246 if (wifi_data.access_point_data.empty())
247 return; 247 return;
248 248
249 typedef std::multiset<const AccessPointData*, AccessPointLess> AccessPointSet; 249 typedef std::multiset<const AccessPointData*, AccessPointLess> AccessPointSet;
250 AccessPointSet access_points_by_signal_strength; 250 AccessPointSet access_points_by_signal_strength;
251 251
252 for (const auto& ap_data : wifi_data.access_point_data) 252 for (const auto& ap_data : wifi_data.access_point_data)
253 access_points_by_signal_strength.insert(&ap_data); 253 access_points_by_signal_strength.insert(&ap_data);
254 254
255 base::ListValue* wifi_access_point_list = new base::ListValue(); 255 base::ListValue* wifi_access_point_list = new base::ListValue();
256 for (const auto& ap_data : access_points_by_signal_strength) { 256 for (auto* ap_data : access_points_by_signal_strength) {
257 base::DictionaryValue* wifi_dict = new base::DictionaryValue(); 257 base::DictionaryValue* wifi_dict = new base::DictionaryValue();
258 AddString("macAddress", base::UTF16ToUTF8(ap_data->mac_address), wifi_dict); 258 AddString("macAddress", base::UTF16ToUTF8(ap_data->mac_address), wifi_dict);
259 AddInteger("signalStrength", ap_data->radio_signal_strength, wifi_dict); 259 AddInteger("signalStrength", ap_data->radio_signal_strength, wifi_dict);
260 AddInteger("age", age_milliseconds, wifi_dict); 260 AddInteger("age", age_milliseconds, wifi_dict);
261 AddInteger("channel", ap_data->channel, wifi_dict); 261 AddInteger("channel", ap_data->channel, wifi_dict);
262 AddInteger("signalToNoiseRatio", ap_data->signal_to_noise, wifi_dict); 262 AddInteger("signalToNoiseRatio", ap_data->signal_to_noise, wifi_dict);
263 wifi_access_point_list->Append(wifi_dict); 263 wifi_access_point_list->Append(wifi_dict);
264 } 264 }
265 request->Set("wifiAccessPoints", wifi_access_point_list); 265 request->Set("wifiAccessPoints", wifi_access_point_list);
266 } 266 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 418
419 // Other fields are optional. 419 // Other fields are optional.
420 GetAsDouble(*response_object, kAccuracyString, &position->accuracy); 420 GetAsDouble(*response_object, kAccuracyString, &position->accuracy);
421 421
422 return true; 422 return true;
423 } 423 }
424 424
425 } // namespace 425 } // namespace
426 426
427 } // namespace content 427 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/host_zoom_map_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698