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

Unified Diff: chromeos/network/managed_state.cc

Issue 14876021: Re-factor network_event_log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address final nits Created 7 years, 7 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/managed_state.cc
diff --git a/chromeos/network/managed_state.cc b/chromeos/network/managed_state.cc
index a4b8de5f91d9d0c4f040d27868680d5d1fcb74cc..b91d4a022c38a7905ea7c24296205369b75e8a3d 100644
--- a/chromeos/network/managed_state.cc
+++ b/chromeos/network/managed_state.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/values.h"
#include "chromeos/network/device_state.h"
+#include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_state.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
@@ -22,7 +23,7 @@ ManagedState::~ManagedState() {
}
ManagedState* ManagedState::Create(ManagedType type, const std::string& path) {
- switch(type) {
+ switch (type) {
case MANAGED_TYPE_NETWORK:
return new NetworkState(path);
case MANAGED_TYPE_DEVICE:
@@ -61,7 +62,7 @@ bool ManagedState::GetBooleanValue(const std::string& key,
bool* out_value) {
bool new_value;
if (!value.GetAsBoolean(&new_value)) {
- LOG(WARNING) << "Failed to parse boolean value for:" << key;
+ NET_LOG_ERROR("Error parsing state value", path() + "." + key);
return false;
}
if (*out_value == new_value)
@@ -75,7 +76,7 @@ bool ManagedState::GetIntegerValue(const std::string& key,
int* out_value) {
int new_value;
if (!value.GetAsInteger(&new_value)) {
- LOG(WARNING) << "Failed to parse integer value for:" << key;
+ NET_LOG_ERROR("Error parsing state value", path() + "." + key);
return false;
}
if (*out_value == new_value)
@@ -89,7 +90,7 @@ bool ManagedState::GetStringValue(const std::string& key,
std::string* out_value) {
std::string new_value;
if (!value.GetAsString(&new_value)) {
- LOG(WARNING) << "Failed to parse string value for:" << key;
+ NET_LOG_ERROR("Error parsing state value", path() + "." + key);
return false;
}
if (*out_value == new_value)
« no previous file with comments | « chromeos/network/managed_network_configuration_handler.cc ('k') | chromeos/network/network_configuration_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698