feat: add about panel customization on linux (#15658)

This commit is contained in:
Shelley Vohr 2018-11-13 17:12:24 -05:00 committed by GitHub
parent bc9a7806a5
commit 787dbbe610
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 20 deletions

View file

@ -392,13 +392,12 @@ void Browser::ShowAboutPanel() {
void Browser::SetAboutPanelOptions(const base::DictionaryValue& options) {
about_panel_options_.Clear();
// Upper case option keys for orderFrontStandardAboutPanelWithOptions format
for (base::DictionaryValue::Iterator iter(options); !iter.IsAtEnd();
iter.Advance()) {
std::string key = iter.key();
if (!key.empty() && iter.value().is_string()) {
for (const auto& pair : options) {
std::string key = pair.first;
const auto& val = pair.second;
if (!key.empty() && val->is_string()) {
key[0] = base::ToUpperASCII(key[0]);
about_panel_options_.SetString(key, iter.value().GetString());
about_panel_options_.SetString(key, val->GetString());
}
}
}