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

Unified Diff: chromeos/network/managed_state.cc

Issue 213853002: Always list EthernetEAP as a Favorite for debugging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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/network/managed_state.h ('k') | chromeos/network/network_state_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/managed_state.cc
diff --git a/chromeos/network/managed_state.cc b/chromeos/network/managed_state.cc
index b4f77fb55e349ef632eeabc5c8a60b10559fa9e1..62e9db41bdafcc42577bc0d1f3f8afdff999cb0d 100644
--- a/chromeos/network/managed_state.cc
+++ b/chromeos/network/managed_state.cc
@@ -19,6 +19,19 @@ bool ManagedState::Matches(const NetworkTypePattern& pattern) const {
return pattern.MatchesType(type());
}
+// static
+std::string ManagedState::TypeToString(ManagedType type) {
+ switch (type) {
+ case MANAGED_TYPE_NETWORK:
+ return "Network";
+ case MANAGED_TYPE_FAVORITE:
+ return "Favorite";
+ case MANAGED_TYPE_DEVICE:
+ return "Device";
+ }
+ return "Unknown";
+}
+
ManagedState::ManagedState(ManagedType type, const std::string& path)
: managed_type_(type),
path_(path),
@@ -107,7 +120,7 @@ bool ManagedState::GetStringValue(const std::string& key,
std::string* out_value) {
std::string new_value;
if (!value.GetAsString(&new_value)) {
- NET_LOG_ERROR("Error parsing state value", path() + "." + key);
+ NET_LOG_ERROR("Error parsing state: " + key, path());
return false;
}
if (*out_value == new_value)
« no previous file with comments | « chromeos/network/managed_state.h ('k') | chromeos/network/network_state_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698