Commit e3f1f0c0 authored by rkc@chromium.org's avatar rkc@chromium.org

Fix about:system output.

Currently we have the debugd logs prefixed with debugd and then duplicated in another key called debugd; this will be fixed with http://code.google.com/p/chromium/issues/detail?id=138582 but for M22, we want to fix the UI to display the logs more appropriately.

Reviews requested,
ellyjones@ - main review.
xiyuan@ - OWNER's review.

R=ellyjones@chromium.org,xiyuan@chromium.org
BUG=140489
TEST=debugd- prefixed keys are gone; so is the debugd key which contained all the logs again.


Review URL: https://chromiumcodereview.appspot.com/10825260

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150882 0039d316-1c4b-4281-b951-d872f2087c98
parent 0c1c4756
...@@ -171,6 +171,13 @@ void SystemInfoUIHTMLSource::RequestComplete() { ...@@ -171,6 +171,13 @@ void SystemInfoUIHTMLSource::RequestComplete() {
chromeos::system::LogDictionaryType::iterator it; chromeos::system::LogDictionaryType::iterator it;
for (it = logs_->begin(); it != logs_->end(); ++it) { for (it = logs_->begin(); it != logs_->end(); ++it) {
DictionaryValue* val = new DictionaryValue; DictionaryValue* val = new DictionaryValue;
// Skip the 'debugd' key; this is a duplicate of all the logs that
// we're already getting from the debugd daemon. This will be fixed
// with http://code.google.com/p/chromium/issues/detail?id=138582
// which incidentally will also remove this code.
if (it->first == "debugd")
continue;
val->SetString("stat_name", it->first); val->SetString("stat_name", it->first);
val->SetString("stat_value", it->second); val->SetString("stat_value", it->second);
details->Append(val); details->Append(val);
...@@ -181,12 +188,7 @@ void SystemInfoUIHTMLSource::RequestComplete() { ...@@ -181,12 +188,7 @@ void SystemInfoUIHTMLSource::RequestComplete() {
chromeos::system::SysInfoResponse::iterator it; chromeos::system::SysInfoResponse::iterator it;
for (it = sys_info_->begin(); it != sys_info_->end(); ++it) { for (it = sys_info_->begin(); it != sys_info_->end(); ++it) {
DictionaryValue* val = new DictionaryValue; DictionaryValue* val = new DictionaryValue;
// Prefix stats coming from debugd with 'debugd-' for now. The code that val->SetString("stat_name", it->first);
// displays stats can only handle one stat with a given name, so this
// prevents names from overlapping. Once the duplicates have been
// removed from userfeedback's list by
// <https://gerrit.chromium.org/gerrit/25106>, the prefix can go away.
val->SetString("stat_name", "debugd-" + it->first);
val->SetString("stat_value", it->second); val->SetString("stat_value", it->second);
details->Append(val); details->Append(val);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment