Merge pull request #7579 from electron/tweak-about-panel-key-names
Use lower-case about panel option keys
This commit is contained in:
commit
fcfc13c1ea
2 changed files with 17 additions and 6 deletions
|
@ -261,7 +261,18 @@ void Browser::ShowAboutPanel() {
|
|||
|
||||
void Browser::SetAboutPanelOptions(const base::DictionaryValue& options) {
|
||||
about_panel_options_.Clear();
|
||||
about_panel_options_.MergeDictionary(&options);
|
||||
|
||||
// Upper case option keys for orderFrontStandardAboutPanelWithOptions format
|
||||
for (base::DictionaryValue::Iterator iter(options);
|
||||
!iter.IsAtEnd();
|
||||
iter.Advance()) {
|
||||
std::string key = iter.key();
|
||||
std::string value;
|
||||
if (!key.empty() && iter.value().GetAsString(&value)) {
|
||||
key[0] = base::ToUpperASCII(key[0]);
|
||||
about_panel_options_.SetString(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue