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

Side by Side Diff: chrome/browser/chromeos/cros/network_ip_config.h

Issue 11367048: This is the first pass at making GetIPConfigs asynchronous. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
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 CHROME_BROWSER_CHROMEOS_CROS_NETWORK_IP_CONFIG_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_IP_CONFIG_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_IP_CONFIG_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_IP_CONFIG_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback.h"
12 13
13 namespace chromeos { 14 namespace chromeos {
14 15
15 // ipconfig types (see flimflam/files/doc/ipconfig-api.txt) 16 // ipconfig types (see flimflam/files/doc/ipconfig-api.txt)
16 enum IPConfigType { 17 enum IPConfigType {
17 IPCONFIG_TYPE_UNKNOWN, 18 IPCONFIG_TYPE_UNKNOWN,
18 IPCONFIG_TYPE_IPV4, 19 IPCONFIG_TYPE_IPV4,
19 IPCONFIG_TYPE_IPV6, 20 IPCONFIG_TYPE_IPV6,
20 IPCONFIG_TYPE_DHCP, 21 IPCONFIG_TYPE_DHCP,
21 IPCONFIG_TYPE_BOOTP, // Not Used. 22 IPCONFIG_TYPE_BOOTP, // Not Used.
(...skipping 14 matching lines...) Expand all
36 std::string device_path; // This looks like "/device/0011aa22bb33" 37 std::string device_path; // This looks like "/device/0011aa22bb33"
37 IPConfigType type; 38 IPConfigType type;
38 std::string address; 39 std::string address;
39 std::string netmask; 40 std::string netmask;
40 std::string gateway; 41 std::string gateway;
41 std::string name_servers; 42 std::string name_servers;
42 }; 43 };
43 44
44 typedef std::vector<NetworkIPConfig> NetworkIPConfigVector; 45 typedef std::vector<NetworkIPConfig> NetworkIPConfigVector;
45 46
47 // Used to return the list of IP configs and hardware address from an
48 // asynchronous call to Shill. The hardware address is usually a MAC address
49 // like "0011AA22BB33". |hardware_address| will be an empty string, if no
50 // hardware address is found.
51 typedef base::Callback<void(const NetworkIPConfigVector& ip_configs,
52 const std::string& hardware_address)>
53 NetworkGetIPConfigsCallback;
54
46 } // namespace chromeos 55 } // namespace chromeos
47 56
48 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_IP_CONFIG_H_ 57 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_IP_CONFIG_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mock_network_library.h ('k') | chrome/browser/chromeos/cros/network_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698