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 |
} |