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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 3173038: Enabling about:system page to select shown entries and to scroll to specific ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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: chrome/browser/browser_about_handler.cc
===================================================================
--- chrome/browser/browser_about_handler.cc (revision 57084)
+++ chrome/browser/browser_about_handler.cc (working copy)
@@ -778,13 +778,28 @@
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_ABOUT_SYNC_HTML));
- return jstemplate_builder::GetTemplateHtml(
+ return jstemplate_builder::GetTemplatesHtml(
sync_html, &strings , "t" /* template root node id */);
}
#if defined(OS_CHROMEOS)
-std::string AboutSys() {
+std::string AboutSys(const std::string& query) {
DictionaryValue strings;
+ strings.SetString("title", l10n_util::GetStringUTF16(IDS_ABOUT_SYS_TITLE));
+ strings.SetString("description",
+ l10n_util::GetStringUTF16(IDS_ABOUT_SYS_DESC));
+ strings.SetString("table_title",
+ l10n_util::GetStringUTF16(IDS_ABOUT_SYS_TABLE_TITLE));
+ strings.SetString("expand_all_btn",
+ l10n_util::GetStringUTF16(IDS_ABOUT_SYS_EXPAND_ALL));
+ strings.SetString("collapse_all_btn",
+ l10n_util::GetStringUTF16(IDS_ABOUT_SYS_COLLAPSE_ALL));
+ strings.SetString("expand_btn",
+ l10n_util::GetStringUTF16(IDS_ABOUT_SYS_EXPAND));
+ strings.SetString("collapse_btn",
+ l10n_util::GetStringUTF16(IDS_ABOUT_SYS_COLLAPSE));
+ ChromeURLDataManager::DataSource::SetFontAndTextDirection(&strings);
+
chromeos::SyslogsLibrary* syslogs_lib =
chromeos::CrosLibrary::Get()->GetSyslogsLibrary();
scoped_ptr<chromeos::LogDictionaryType> sys_info;
@@ -794,19 +809,19 @@
ListValue* details = new ListValue();
strings.Set("details", details);
chromeos::LogDictionaryType::iterator it;
-
for (it = sys_info.get()->begin(); it != sys_info.get()->end(); ++it) {
DictionaryValue* val = new DictionaryValue;
- val->SetString("stat_name", (*it).first);
- val->SetString("stat_value", (*it).second);
+ val->SetString("stat_name", it->first);
+ val->SetString("stat_value", it->second);
details->Append(val);
}
+ strings.SetString("anchor", query);
}
static const base::StringPiece sys_html(
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_ABOUT_SYS_HTML));
- return jstemplate_builder::GetTemplateHtml(
+ return jstemplate_builder::GetTemplatesHtml(
sys_html, &strings , "t" /* template root node id */);
}
#endif
@@ -897,7 +912,7 @@
response = AboutSync();
#if defined(OS_CHROMEOS)
} else if (path == kSysPath) {
- response = AboutSys();
+ response = AboutSys(info);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698