summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 23:49:40 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-18 23:49:40 +0000
commitdfa5b95c3816f8416ac519f6bbab9e13237273a5 (patch)
tree7a873ce1656f81fa4b6df46d7fc35165fb1d8ca1 /chromeos
parent4bc0a14fdfdb67af7b879b51a5efe645e00e4fe7 (diff)
downloadchromium_src-dfa5b95c3816f8416ac519f6bbab9e13237273a5.zip
chromium_src-dfa5b95c3816f8416ac519f6bbab9e13237273a5.tar.gz
chromium_src-dfa5b95c3816f8416ac519f6bbab9e13237273a5.tar.bz2
Include FavoriteState in chrome://network
BUG=353376 R=pneubeck@chromium.org, tbarzic@chromium.org, xiyuan@chromium.org Review URL: https://codereview.chromium.org/202493006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/network/favorite_state.cc17
-rw-r--r--chromeos/network/favorite_state.h5
-rw-r--r--chromeos/network/network_state.cc8
-rw-r--r--chromeos/network/network_state.h5
4 files changed, 27 insertions, 8 deletions
diff --git a/chromeos/network/favorite_state.cc b/chromeos/network/favorite_state.cc
index f43d332..0ba576f 100644
--- a/chromeos/network/favorite_state.cc
+++ b/chromeos/network/favorite_state.cc
@@ -72,4 +72,21 @@ bool FavoriteState::IsPrivate() const {
profile_path_ != NetworkProfileHandler::GetSharedProfilePath();
}
+void FavoriteState::GetProperties(base::DictionaryValue* dictionary) const {
+ dictionary->SetStringWithoutPathExpansion(shill::kNameProperty, name());
+ dictionary->SetStringWithoutPathExpansion(shill::kTypeProperty, type());
+ dictionary->SetStringWithoutPathExpansion(shill::kProfileProperty,
+ profile_path_);
+ dictionary->SetStringWithoutPathExpansion(shill::kGuidProperty, guid_);
+
+ // ONCSource is used for debugging in chrome://network.
+ scoped_ptr<base::DictionaryValue> onc_dict(new base::DictionaryValue);
+ ui_data_.FillDictionary(onc_dict.get());
+ std::string onc_source;
+ onc_dict->GetStringWithoutPathExpansion(NetworkUIData::kKeyONCSource,
+ &onc_source);
+ dictionary->SetStringWithoutPathExpansion(NetworkUIData::kKeyONCSource,
+ onc_source);
+}
+
} // namespace chromeos
diff --git a/chromeos/network/favorite_state.h b/chromeos/network/favorite_state.h
index dbce3c0..e1d8e11 100644
--- a/chromeos/network/favorite_state.h
+++ b/chromeos/network/favorite_state.h
@@ -41,6 +41,11 @@ class CHROMEOS_EXPORT FavoriteState : public ManagedState {
// Returns true if the network properties are stored in a user profile.
bool IsPrivate() const;
+ // Fills |dictionary| with the state properties. Only properties that are
+ // parsed by PropertyChanged are stored in |dictionary|. The dictionary
+ // includes the 'onc_source' property from |ui_data_|.
+ void GetProperties(base::DictionaryValue* dictionary) const;
+
private:
std::string profile_path_;
NetworkUIData ui_data_;
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index 3e52d56..e6f344d 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -202,11 +202,9 @@ void NetworkState::GetProperties(base::DictionaryValue* dictionary) const {
security_);
dictionary->SetStringWithoutPathExpansion(shill::kEapMethodProperty,
eap_method_);
- // Proxy config and ONC source are intentionally omitted: These properties are
- // placed in NetworkState to transition ProxyConfigServiceImpl from
- // NetworkLibrary to the new network stack. The networking extension API
- // shouldn't depend on this member. Once ManagedNetworkConfigurationHandler
- // is used instead of NetworkLibrary, we can remove them again.
+
+ // ui_data_ (contains ONC source) is intentionally omitted.
+
dictionary->SetStringWithoutPathExpansion(
shill::kNetworkTechnologyProperty,
network_technology_);
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 514d690..c9b6dcb 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -37,9 +37,8 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
virtual bool InitialPropertiesReceived(
const base::DictionaryValue& properties) OVERRIDE;
- // Fills |dictionary| with the state properties. All the properties that are
- // accepted by PropertyChanged are stored in |dictionary|, no other values are
- // stored.
+ // Fills |dictionary| with the state properties. All properties that are
+ // parsed by PropertyChanged are stored in |dictionary|, except |ui_data_|.
void GetProperties(base::DictionaryValue* dictionary) const;
// Returns true, if the network requires a service activation.