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

Unified Diff: chromeos/network/network_state.h

Issue 12634019: NetworkChangeNotifierChromeos: Handle IPConfig property changes on the default network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/network_change_notifier_chromeos_unittest.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state.h
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 995982417ec37faa1b87131ce118b853576451c1..d43def68b30af8dbca3e37a8db5f7f3672e7e18c 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -5,6 +5,9 @@
#ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_
#define CHROMEOS_NETWORK_NETWORK_STATE_H_
+#include <string>
+#include <vector>
+
#include "chromeos/network/managed_state.h"
namespace base {
@@ -36,6 +39,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// Accessors
const std::string& security() const { return security_; }
const std::string& ip_address() const { return ip_address_; }
+ const std::vector<std::string>& dns_servers() const { return dns_servers_; }
const std::string& device_path() const { return device_path_; }
const std::string& guid() const { return guid_; }
const std::string& connection_state() const { return connection_state_; }
@@ -61,6 +65,10 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
static bool StateIsConnected(const std::string& connection_state);
static bool StateIsConnecting(const std::string& connection_state);
+ // Helper to return a full prefixed version of an IPConfig property
+ // key.
+ static std::string IPConfigProperty(const char* key);
+
private:
friend class NetworkStateHandler;
friend class NetworkChangeNotifierChromeosUpdateTest;
@@ -69,17 +77,24 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
void set_ip_address(const std::string& ip_address) {
ip_address_ = ip_address;
}
+ void set_dns_servers(const std::vector<std::string>& dns_servers) {
+ dns_servers_ = dns_servers;
+ }
// Common Network Service properties
std::string security_;
std::string device_path_;
std::string guid_;
- std::string ip_address_;
std::string connection_state_;
std::string error_;
bool auto_connect_;
bool favorite_;
int priority_;
+ // IPConfig properties.
+ // Note: These do not correspond to actual Shill.Service properties
+ // but are derived from the service's corresponding IPConfig object.
+ std::string ip_address_;
+ std::vector<std::string> dns_servers_;
// Wireless properties
int signal_strength_;
// Cellular properties
« no previous file with comments | « chromeos/network/network_change_notifier_chromeos_unittest.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698