summaryrefslogtreecommitdiffstats
path: root/chromeos/network
diff options
context:
space:
mode:
authorgauravsh@chromium.org <gauravsh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 06:40:54 +0000
committergauravsh@chromium.org <gauravsh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 06:40:54 +0000
commit84302cf6bbca607fd255647c707989cb22662e9b (patch)
treebb3c5df8c43acb1cd481ca1d54bf57d7196fd237 /chromeos/network
parent4498f49f75db852ec356a55ae55aa1e0e9f615c6 (diff)
downloadchromium_src-84302cf6bbca607fd255647c707989cb22662e9b.zip
chromium_src-84302cf6bbca607fd255647c707989cb22662e9b.tar.gz
chromium_src-84302cf6bbca607fd255647c707989cb22662e9b.tar.bz2
Add cellular activation over non-cellular network property to NetworkState
BUG=chromium:188753 Review URL: https://chromiumcodereview.appspot.com/12596008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network')
-rw-r--r--chromeos/network/network_state.cc5
-rw-r--r--chromeos/network/network_state.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index d16084d..51002fd 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -40,6 +40,8 @@ bool NetworkState::PropertyChanged(const std::string& key,
return GetStringValue(key, value, &device_path_);
} else if (key == flimflam::kGuidProperty) {
return GetStringValue(key, value, &guid_);
+ } else if (key == shill::kActivateOverNonCellularNetworkProperty) {
+ return GetBooleanValue(key, value, &activate_over_non_cellular_networks_);
}
return false;
}
@@ -66,6 +68,9 @@ void NetworkState::GetProperties(base::DictionaryValue* dictionary) const {
dictionary->SetStringWithoutPathExpansion(flimflam::kDeviceProperty,
device_path());
dictionary->SetStringWithoutPathExpansion(flimflam::kGuidProperty, guid());
+ dictionary->SetBooleanWithoutPathExpansion(
+ shill::kActivateOverNonCellularNetworkProperty,
+ activate_over_non_cellular_networks());
}
bool NetworkState::IsConnectedState() const {
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 99a8a28..f8f9567 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -46,6 +46,9 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
const std::string& technology() const { return technology_; }
const std::string& activation_state() const { return activation_state_; }
const std::string& roaming() const { return roaming_; }
+ bool activate_over_non_cellular_networks() const {
+ return activate_over_non_cellular_networks_;
+ }
bool IsConnectedState() const;
bool IsConnectingState() const;
@@ -76,6 +79,7 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
std::string technology_;
std::string activation_state_;
std::string roaming_;
+ bool activate_over_non_cellular_networks_;
DISALLOW_COPY_AND_ASSIGN(NetworkState);
};