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

Unified Diff: chromeos/network/favorite_state.cc

Issue 21046008: Convert all connect code to use NetworkHandler instead of NetworkLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add NetworkConfigurationHandler::SetNetworkProfile Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/favorite_state.cc
diff --git a/chromeos/network/favorite_state.cc b/chromeos/network/favorite_state.cc
index 90043e9cfc24abc6f465f4c19107f191caeb233b..2bc6b8ef7bd7ca580a05e989729db31abc405559 100644
--- a/chromeos/network/favorite_state.cc
+++ b/chromeos/network/favorite_state.cc
@@ -15,32 +15,31 @@
namespace chromeos {
FavoriteState::FavoriteState(const std::string& path)
- : ManagedState(MANAGED_TYPE_FAVORITE, path),
- onc_source_(onc::ONC_SOURCE_NONE) {
+ : ManagedState(MANAGED_TYPE_FAVORITE, path) {
}
FavoriteState::~FavoriteState() {
}
bool FavoriteState::PropertyChanged(const std::string& key,
- const base::Value& value) {
+ const base::Value& value) {
if (ManagedStatePropertyChanged(key, value))
return true;
if (key == flimflam::kProfileProperty) {
return GetStringValue(key, value, &profile_path_);
} else if (key == flimflam::kUIDataProperty) {
- if (!NetworkState::GetOncSource(value, &onc_source_)) {
+ if (!NetworkState::GetUIDataFromValue(value, &ui_data_)) {
NET_LOG_ERROR("Failed to parse " + key, path());
return false;
}
return true;
-}
+ }
return false;
}
bool FavoriteState::IsManaged() const {
- return onc_source_ == onc::ONC_SOURCE_DEVICE_POLICY ||
- onc_source_ == onc::ONC_SOURCE_USER_POLICY;
+ return ui_data_.onc_source() == onc::ONC_SOURCE_DEVICE_POLICY ||
+ ui_data_.onc_source() == onc::ONC_SOURCE_USER_POLICY;
}
bool FavoriteState::IsPrivate() const {

Powered by Google App Engine
This is Rietveld 408576698