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

Side by Side Diff: chromeos/network/network_util.h

Issue 275543005: Use GUID instead of ServicePath in networkingPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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 | Annotate | Revision Log
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 #ifndef CHROMEOS_NETWORK_NETWORK_UTIL_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_UTIL_H_
6 #define CHROMEOS_NETWORK_NETWORK_UTIL_H_ 6 #define CHROMEOS_NETWORK_NETWORK_UTIL_H_
7 7
8 // This header is introduced to make it easy to switch from chromeos_network.cc 8 // This header is introduced to make it easy to switch from chromeos_network.cc
9 // to Chrome's own DBus code. crosbug.com/16557 9 // to Chrome's own DBus code. crosbug.com/16557
10 // All calls to functions in chromeos_network.h should be made through 10 // All calls to functions in chromeos_network.h should be made through
11 // functions provided by this header. 11 // functions provided by this header.
12 12
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/callback.h" 17 #include "base/callback.h"
pneubeck (no reviews) 2014/05/12 13:37:07 #include "base/memory/scoped_ptr.h"
stevenjb 2014/05/13 01:19:00 Done.
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "chromeos/chromeos_export.h" 20 #include "chromeos/chromeos_export.h"
21 21
22 namespace base {
23 class ListValue;
24 }
25
22 namespace chromeos { 26 namespace chromeos {
23 27
28 class NetworkTypePattern;
29
24 // Struct for passing wifi access point data. 30 // Struct for passing wifi access point data.
25 struct CHROMEOS_EXPORT WifiAccessPoint { 31 struct CHROMEOS_EXPORT WifiAccessPoint {
26 WifiAccessPoint(); 32 WifiAccessPoint();
27 ~WifiAccessPoint(); 33 ~WifiAccessPoint();
28 std::string ssid; // The ssid of the WiFi node if available. 34 std::string ssid; // The ssid of the WiFi node if available.
29 std::string mac_address; // The mac address of the WiFi node. 35 std::string mac_address; // The mac address of the WiFi node.
30 base::Time timestamp; // Timestamp when this AP was detected. 36 base::Time timestamp; // Timestamp when this AP was detected.
31 int signal_strength; // Radio signal strength measured in dBm. 37 int signal_strength; // Radio signal strength measured in dBm.
32 int signal_to_noise; // Current signal to noise ratio measured in dB. 38 int signal_to_noise; // Current signal to noise ratio measured in dB.
33 int channel; // Wifi channel number. 39 int channel; // Wifi channel number.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Converts a |netmask| to a prefixlen. (for IPv4 only) 78 // Converts a |netmask| to a prefixlen. (for IPv4 only)
73 // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24 79 // e.g. a |netmask| of 255.255.255.0 is converted to a prefixlen of 24
74 CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask); 80 CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask);
75 81
76 // Parses |list|, which contains DictionaryValues and returns a vector of 82 // Parses |list|, which contains DictionaryValues and returns a vector of
77 // CellularScanResult in |scan_results|. Returns false if parsing fails, 83 // CellularScanResult in |scan_results|. Returns false if parsing fails,
78 // in which case the contents of |scan_results| will be undefined. 84 // in which case the contents of |scan_results| will be undefined.
79 CHROMEOS_EXPORT bool ParseCellularScanResults( 85 CHROMEOS_EXPORT bool ParseCellularScanResults(
80 const base::ListValue& list, std::vector<CellularScanResult>* scan_results); 86 const base::ListValue& list, std::vector<CellularScanResult>* scan_results);
81 87
88 // Retrieves the list of network services and translates each into a list of
89 // ONC dictionaries using TranslateShillServiceToONCPart.
pneubeck (no reviews) 2014/05/12 13:37:07 reference NetworkStateHandler::NetworkList (so tha
stevenjb 2014/05/13 01:19:00 This actually changes in the getNetworks CL to spe
90 CHROMEOS_EXPORT scoped_ptr<base::ListValue> TranslateNetworkListToONC(
91 NetworkTypePattern pattern);
92
82 } // namespace network_util 93 } // namespace network_util
83 } // namespace chromeos 94 } // namespace chromeos
84 95
85 #endif // CHROMEOS_NETWORK_NETWORK_UTIL_H_ 96 #endif // CHROMEOS_NETWORK_NETWORK_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698