summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 21:14:50 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 21:14:50 +0000
commitcb63a0b87e4e8ba239d1cf2c08350b239ff5a585 (patch)
treed9851659fca73ea54e0add4d7de59df0e926a26f
parent6ddb78d363bfa2f55faa77e6dd73bb4b69b03e45 (diff)
downloadchromium_src-cb63a0b87e4e8ba239d1cf2c08350b239ff5a585.zip
chromium_src-cb63a0b87e4e8ba239d1cf2c08350b239ff5a585.tar.gz
chromium_src-cb63a0b87e4e8ba239d1cf2c08350b239ff5a585.tar.bz2
Merge 217452 "Include additional network event logging in feedback"
> Include additional network event logging in feedback > > We need additional context to debug some networking issues for M30. > This cleans up some uninteresting entries, removes the date from the > timestamp, and doubles the number of lines sent in a feedback report. > > BUG=266032 > R=gauravsh@chromium.org > > Review URL: https://codereview.chromium.org/23136002 TBR=stevenjb@chromium.org Review URL: https://codereview.chromium.org/22222003 git-svn-id: svn://svn.chromium.org/chrome/branches/1599/src@217647 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/system_logs/network_event_log_source.cc2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc5
-rw-r--r--chromeos/network/network_configuration_handler.cc17
-rw-r--r--chromeos/network/network_event_log.cc2
-rw-r--r--chromeos/network/network_handler_callbacks.cc7
-rw-r--r--chromeos/network/network_handler_callbacks.h2
6 files changed, 26 insertions, 9 deletions
diff --git a/chrome/browser/chromeos/system_logs/network_event_log_source.cc b/chrome/browser/chromeos/system_logs/network_event_log_source.cc
index 76c743b..56fd82e 100644
--- a/chrome/browser/chromeos/system_logs/network_event_log_source.cc
+++ b/chrome/browser/chromeos/system_logs/network_event_log_source.cc
@@ -17,7 +17,7 @@ void NetworkEventLogSource::Fetch(const SysLogsSourceCallback& callback) {
DCHECK(!callback.is_null());
scoped_ptr<SystemLogsResponse> response(new SystemLogsResponse);
- const int kMaxNetworkEventsForAboutSystem = 200;
+ const int kMaxNetworkEventsForAboutSystem = 400;
(*response)[kNetworkEventLogEntry] = network_event_log::GetAsString(
network_event_log::OLDEST_FIRST,
"time,file,desc",
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index aa5bebc..69b0dc7 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -261,6 +261,11 @@ const int kPreferredPriority = 1;
void ShillError(const std::string& function,
const std::string& error_name,
scoped_ptr<base::DictionaryValue> error_data) {
+ // UpdateConnectionData may send requests for stale services; ignore
+ // these errors.
+ if (function == "UpdateConnectionData" &&
+ error_name == network_handler::kDBusFailedError)
+ return;
NET_LOG_ERROR("Shill Error from InternetOptionsHandler: " + error_name,
function);
}
diff --git a/chromeos/network/network_configuration_handler.cc b/chromeos/network/network_configuration_handler.cc
index 81f9759..59693d9 100644
--- a/chromeos/network/network_configuration_handler.cc
+++ b/chromeos/network/network_configuration_handler.cc
@@ -63,9 +63,20 @@ void GetPropertiesCallback(
properties_copy->SetStringWithoutPathExpansion(
flimflam::kNameProperty, name);
}
- network_handler::GetPropertiesCallback(
- callback, error_callback, service_path, call_status,
- *properties_copy.get());
+ if (call_status != DBUS_METHOD_CALL_SUCCESS) {
+ // Because network services are added and removed frequently, we will see
+ // failures regularly, so don't log these.
+ if (!error_callback.is_null()) {
+ scoped_ptr<base::DictionaryValue> error_data(
+ network_handler::CreateErrorData(
+ service_path,
+ network_handler::kDBusFailedError,
+ network_handler::kDBusFailedErrorMessage));
+ error_callback.Run(network_handler::kDBusFailedError, error_data.Pass());
+ }
+ } else if (!callback.is_null()) {
+ callback.Run(service_path, *properties_copy.get());
+ }
}
void SetNetworkProfileErrorCallback(
diff --git a/chromeos/network/network_event_log.cc b/chromeos/network/network_event_log.cc
index 96e3c1a..1a77bd3 100644
--- a/chromeos/network/network_event_log.cc
+++ b/chromeos/network/network_event_log.cc
@@ -74,7 +74,7 @@ std::string LogEntry::ToString(bool show_time,
bool format_html) const {
std::string line;
if (show_time)
- line += "[" + UTF16ToUTF8(base::TimeFormatShortDateAndTime(time)) + "] ";
+ line += "[" + UTF16ToUTF8(base::TimeFormatTimeOfDay(time)) + "] ";
if (show_file) {
std::string filestr = format_html ? net::EscapeForHTML(file) : file;
line += base::StringPrintf("%s:%d ", filestr.c_str(), file_line);
diff --git a/chromeos/network/network_handler_callbacks.cc b/chromeos/network/network_handler_callbacks.cc
index 0dcc55f..e34d549 100644
--- a/chromeos/network/network_handler_callbacks.cc
+++ b/chromeos/network/network_handler_callbacks.cc
@@ -76,10 +76,9 @@ void GetPropertiesCallback(
network_handler::CreateErrorData(path,
kDBusFailedError,
kDBusFailedErrorMessage));
- // Because network services are added and removed frequently, we will see
- // these failures regularly, so log as events not errors.
- NET_LOG_EVENT(base::StringPrintf("GetProperties failed: %d", call_status),
- path);
+ NET_LOG_ERROR(
+ base::StringPrintf("GetProperties failed. Status: %d", call_status),
+ path);
if (!error_callback.is_null())
error_callback.Run(kDBusFailedError, error_data.Pass());
} else if (!callback.is_null()) {
diff --git a/chromeos/network/network_handler_callbacks.h b/chromeos/network/network_handler_callbacks.h
index 92fb1d1..f939ef3 100644
--- a/chromeos/network/network_handler_callbacks.h
+++ b/chromeos/network/network_handler_callbacks.h
@@ -19,6 +19,8 @@ class DictionaryValue;
namespace chromeos {
namespace network_handler {
+CHROMEOS_EXPORT extern const char kDBusFailedError[];
+CHROMEOS_EXPORT extern const char kDBusFailedErrorMessage[];
CHROMEOS_EXPORT extern const char kErrorName[];
CHROMEOS_EXPORT extern const char kErrorDetail[];
CHROMEOS_EXPORT extern const char kDbusErrorName[];