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

Side by Side Diff: components/wifi/wifi_service.h

Issue 64683014: Mac OS X-specific implementation of Networking Private API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made networkingPrivateApi available on OS X. Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « components/wifi/fake_wifi_service.cc ('k') | components/wifi/wifi_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 5 #ifndef CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/message_loop/message_loop_proxy.h" 15 #include "base/message_loop/message_loop_proxy.h"
15 #include "base/threading/sequenced_worker_pool.h" 16 #include "base/threading/sequenced_worker_pool.h"
16 #include "base/values.h" 17 #include "base/values.h"
17 #include "components/wifi/wifi_export.h" 18 #include "components/wifi/wifi_export.h"
18 19
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 WiFiService() {} 82 WiFiService() {}
82 83
83 typedef int32 Frequency; 84 typedef int32 Frequency;
84 enum FrequencyEnum { 85 enum FrequencyEnum {
85 kFrequencyAny = 0, 86 kFrequencyAny = 0,
86 kFrequencyUnknown = 0, 87 kFrequencyUnknown = 0,
87 kFrequency2400 = 2400, 88 kFrequency2400 = 2400,
88 kFrequency5000 = 5000 89 kFrequency5000 = 5000
89 }; 90 };
90 91
91 typedef std::list<Frequency> FrequencyList; 92 typedef std::set<Frequency> FrequencySet;
92 // Network Properties, used as result of |GetProperties| and 93 // Network Properties, used as result of |GetProperties| and
93 // |GetVisibleNetworks|. 94 // |GetVisibleNetworks|.
94 struct WIFI_EXPORT NetworkProperties { 95 struct WIFI_EXPORT NetworkProperties {
95 NetworkProperties(); 96 NetworkProperties();
96 ~NetworkProperties(); 97 ~NetworkProperties();
97 98
98 std::string connection_state; 99 std::string connection_state;
99 std::string guid; 100 std::string guid;
100 std::string name; 101 std::string name;
101 std::string ssid; 102 std::string ssid;
102 std::string bssid; 103 std::string bssid;
103 std::string type; 104 std::string type;
104 std::string security; 105 std::string security;
105 // WiFi Signal Strength. 0..100 106 // WiFi Signal Strength. 0..100
106 uint32 signal_strength; 107 uint32 signal_strength;
107 bool auto_connect; 108 bool auto_connect;
108 Frequency frequency; 109 Frequency frequency;
109 FrequencyList frequency_list; 110 FrequencySet frequency_set;
110 111
111 std::string json_extra; // Extra JSON properties for unit tests 112 std::string json_extra; // Extra JSON properties for unit tests
112 113
113 scoped_ptr<base::DictionaryValue> ToValue(bool network_list) const; 114 scoped_ptr<base::DictionaryValue> ToValue(bool network_list) const;
114 bool UpdateFromValue(const base::DictionaryValue& value); 115 bool UpdateFromValue(const base::DictionaryValue& value);
115 static std::string MacAddressAsString(const uint8 mac_as_int[6]); 116 static std::string MacAddressAsString(const uint8 mac_as_int[6]);
116 static bool OrderByType(const NetworkProperties& l, 117 static bool OrderByType(const NetworkProperties& l,
117 const NetworkProperties& r); 118 const NetworkProperties& r);
118 }; 119 };
119 120
120 typedef std::list<NetworkProperties> NetworkList; 121 typedef std::list<NetworkProperties> NetworkList;
121 122
122 private: 123 private:
123 DISALLOW_COPY_AND_ASSIGN(WiFiService); 124 DISALLOW_COPY_AND_ASSIGN(WiFiService);
124 }; 125 };
125 } // namespace wifi 126 } // namespace wifi
126 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 127 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
OLDNEW
« no previous file with comments | « components/wifi/fake_wifi_service.cc ('k') | components/wifi/wifi_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698