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

Unified Diff: components/autofill/core/browser/country_names.cc

Issue 1635813003: country_names.cc: change SetLocaleString to take const ref instead of value (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « components/autofill/core/browser/country_names.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/country_names.cc
diff --git a/components/autofill/core/browser/country_names.cc b/components/autofill/core/browser/country_names.cc
index f5b4cdff3aa87b02b3eec2379bdbe69a5d563dec..7a47d1f367a69ac21892cc76ecc86878dcbcf158 100644
--- a/components/autofill/core/browser/country_names.cc
+++ b/components/autofill/core/browser/country_names.cc
@@ -5,7 +5,6 @@
#include "components/autofill/core/browser/country_names.h"
#include <stdint.h>
-#include <utility>
#include "base/lazy_instance.h"
#include "base/logging.h"
@@ -142,13 +141,13 @@ CountryNames* CountryNames::GetInstance() {
}
// static
-void CountryNames::SetLocaleString(std::string locale) {
+void CountryNames::SetLocaleString(const std::string& locale) {
DCHECK(!locale.empty());
// Application locale should never be empty. The empty value of
// |g_application_locale| means that it has not been initialized yet.
std::string* storage = g_application_locale.Pointer();
if (storage->empty()) {
- *storage = std::move(locale);
+ *storage = locale;
}
// TODO(crbug.com/579971) CountryNames currently cannot adapt to changed
// locale without Chrome's restart.
« no previous file with comments | « components/autofill/core/browser/country_names.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698