Index: chromeos/network/favorite_state.cc |
diff --git a/chromeos/network/favorite_state.cc b/chromeos/network/favorite_state.cc |
index 90043e9cfc24abc6f465f4c19107f191caeb233b..ed742a44b4bba46bb827d93ae9cebe0783c396ff 100644 |
--- a/chromeos/network/favorite_state.cc |
+++ b/chromeos/network/favorite_state.cc |
@@ -15,8 +15,7 @@ |
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() { |
@@ -29,18 +28,18 @@ bool FavoriteState::PropertyChanged(const std::string& key, |
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 { |