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

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: Restore check VPN PassphraseRequred Created 7 years, 5 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..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 {

Powered by Google App Engine
This is Rietveld 408576698