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

Unified Diff: chromeos/network/favorite_state.cc

Issue 23551004: Move Shill property utility functions to a new separate file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 3 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
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/network/managed_network_configuration_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/favorite_state.cc
diff --git a/chromeos/network/favorite_state.cc b/chromeos/network/favorite_state.cc
index 2bc6b8ef7bd7ca580a05e989729db31abc405559..a365a912916cc978e4114a662851ed2347048bdc 100644
--- a/chromeos/network/favorite_state.cc
+++ b/chromeos/network/favorite_state.cc
@@ -10,6 +10,7 @@
#include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_profile_handler.h"
#include "chromeos/network/network_state.h"
+#include "chromeos/network/shill_property_util.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
@@ -28,10 +29,13 @@ bool FavoriteState::PropertyChanged(const std::string& key,
if (key == flimflam::kProfileProperty) {
return GetStringValue(key, value, &profile_path_);
} else if (key == flimflam::kUIDataProperty) {
- if (!NetworkState::GetUIDataFromValue(value, &ui_data_)) {
+ scoped_ptr<NetworkUIData> new_ui_data =
+ shill_property_util::GetUIDataFromValue(value);
+ if (!new_ui_data) {
NET_LOG_ERROR("Failed to parse " + key, path());
return false;
}
+ ui_data_ = *new_ui_data;
return true;
}
return false;
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/network/managed_network_configuration_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698