diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index f8da302748..9adf9052cd 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -748,7 +748,7 @@ void Browser::ShowAboutPanel() { "applicationName", "applicationVersion", "copyright", "credits"}; const std::string* str; - for (std::string opt : stringOptions) { + for (const std::string& opt : stringOptions) { if ((str = dict.FindString(opt))) { aboutMessage.append(*str).append("\r\n"); } diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index 0229ed3439..b85b2181a7 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -310,7 +310,7 @@ std::string RecursiveDumpAXPlatformNodeAsString( std::string line = node->GetDelegate()->GetData().ToString(); std::vector attributes = base::SplitString( line, " ", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY); - for (std::string attribute : attributes) { + for (const std::string& attribute : attributes) { if (ui::AXTreeFormatter::MatchesPropertyFilters(property_filters, attribute, false)) { str += attribute + " ";