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

Unified Diff: chromeos/network/network_state.cc

Issue 12319145: Using the new Network*Handlers in networkingPrivate Extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed some closing periods from comments. 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_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state.cc
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index bbe698aac0628b07074e8cc4d3782e780a9fbcc5..d16084de92e740009dfb2012e71ee06894348d82 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -19,6 +19,7 @@ NetworkState::~NetworkState() {
bool NetworkState::PropertyChanged(const std::string& key,
const base::Value& value) {
+ // Keep care that these properties are the same as in |GetProperties|.
if (ManagedStatePropertyChanged(key, value))
return true;
if (key == flimflam::kSignalStrengthProperty) {
@@ -43,6 +44,30 @@ bool NetworkState::PropertyChanged(const std::string& key,
return false;
}
+void NetworkState::GetProperties(base::DictionaryValue* dictionary) const {
+ // Keep care that these properties are the same as in |PropertyChanged|.
+ dictionary->SetStringWithoutPathExpansion(flimflam::kNameProperty, name());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kTypeProperty, type());
+ dictionary->SetIntegerWithoutPathExpansion(flimflam::kSignalStrengthProperty,
+ signal_strength());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kStateProperty,
+ connection_state());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kErrorProperty,
+ error());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kActivationStateProperty,
+ activation_state());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kRoamingStateProperty,
+ roaming());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kSecurityProperty,
+ security());
+ dictionary->SetStringWithoutPathExpansion(
+ flimflam::kNetworkTechnologyProperty,
+ technology());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kDeviceProperty,
+ device_path());
+ dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid());
+}
+
bool NetworkState::IsConnectedState() const {
return StateIsConnected(connection_state_);
}
« no previous file with comments | « chromeos/network/network_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698