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

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

Issue 10827283: This updates the StaticIP configuration UI to match new mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years, 4 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 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
(...skipping 15 matching lines...) Expand all
26 26
27 // IP Configuration. 27 // IP Configuration.
28 struct NetworkIPConfig { 28 struct NetworkIPConfig {
29 NetworkIPConfig(const std::string& device_path, IPConfigType type, 29 NetworkIPConfig(const std::string& device_path, IPConfigType type,
30 const std::string& address, const std::string& netmask, 30 const std::string& address, const std::string& netmask,
31 const std::string& gateway, const std::string& name_servers); 31 const std::string& gateway, const std::string& name_servers);
32 ~NetworkIPConfig(); 32 ~NetworkIPConfig();
33 33
34 std::string ToString() const; 34 std::string ToString() const;
35 35
36 // Gets the PrefixLength for an IPv4 netmask.
37 // For example, "255.255.255.0" => 24
38 // If the netmask is invalid, this will return -1;
39 // TODO(chocobo): Add support for IPv6.
40 int32 GetPrefixLength() const;
41 std::string device_path; // This looks like "/device/0011aa22bb33" 36 std::string device_path; // This looks like "/device/0011aa22bb33"
42 IPConfigType type; 37 IPConfigType type;
43 std::string address; 38 std::string address;
44 std::string netmask; 39 std::string netmask;
45 std::string gateway; 40 std::string gateway;
46 std::string name_servers; 41 std::string name_servers;
47 }; 42 };
48 43
49 typedef std::vector<NetworkIPConfig> NetworkIPConfigVector; 44 typedef std::vector<NetworkIPConfig> NetworkIPConfigVector;
50 45
51 } // namespace chromeos 46 } // namespace chromeos
52 47
53 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_IP_CONFIG_H_ 48 #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_ip_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698