Remove PlatformFile from profile_browsertest
[chromium-blink-merge.git] / content / browser / geolocation / wifi_data.h
blob72bc3065abb3d9f77cd32b77ed24343800942127
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_H_
6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_H_
8 #include <set>
10 #include "base/basictypes.h"
11 #include "base/strings/string16.h"
12 #include "content/common/content_export.h"
14 namespace content {
16 // Wifi data relating to a single access point.
17 struct CONTENT_EXPORT AccessPointData {
18 AccessPointData();
19 ~AccessPointData();
21 // MAC address, formatted as per MacAddressAsString16.
22 base::string16 mac_address;
23 int radio_signal_strength; // Measured in dBm
24 int channel;
25 int signal_to_noise; // Ratio in dB
26 base::string16 ssid; // Network identifier
29 // This is to allow AccessPointData to be used in std::set. We order
30 // lexicographically by MAC address.
31 struct AccessPointDataLess {
32 bool operator()(const AccessPointData& data1,
33 const AccessPointData& data2) const {
34 return data1.mac_address < data2.mac_address;
38 // All data for wifi.
39 struct CONTENT_EXPORT WifiData {
40 WifiData();
41 ~WifiData();
43 // Determines whether a new set of WiFi data differs significantly from this.
44 bool DiffersSignificantly(const WifiData& other) const;
46 // Store access points as a set, sorted by MAC address. This allows quick
47 // comparison of sets for detecting changes and for caching.
48 typedef std::set<AccessPointData, AccessPointDataLess> AccessPointDataSet;
49 AccessPointDataSet access_point_data;
52 } // namespace content
54 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_H_