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

Unified Diff: chrome/browser/ui/webui/options/autofill_options_handler.cc

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 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
Index: chrome/browser/ui/webui/options/autofill_options_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/autofill_options_handler.cc (revision 192613)
+++ chrome/browser/ui/webui/options/autofill_options_handler.cc (working copy)
@@ -15,6 +15,7 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/autofill/country_combobox_model.h"
#include "chrome/common/url_constants.h"
@@ -33,9 +34,8 @@
// Sets data related to the country <select>.
void SetCountryData(DictionaryValue* localized_strings) {
- std::string app_locale = AutofillCountry::ApplicationLocale();
- std::string default_country_code =
- AutofillCountry::CountryCodeForLocale(app_locale);
+ std::string default_country_code = AutofillCountry::CountryCodeForLocale(
+ g_browser_process->GetApplicationLocale());
localized_strings->SetString("defaultCountryCode", default_country_code);
autofill::CountryComboboxModel model;
@@ -199,6 +199,7 @@
}
bool is_duplicate = false;
+ std::string app_locale = g_browser_process->GetApplicationLocale();
for (size_t i = 0; i < list->GetSize() && !is_duplicate; ++i) {
if (i == index)
continue;
@@ -208,9 +209,8 @@
NOTREACHED() << "List should have a value at index " << i;
continue;
}
- is_duplicate = autofill_i18n::PhoneNumbersMatch(new_value,
- existing_value,
- country_code);
+ is_duplicate = autofill_i18n::PhoneNumbersMatch(
+ new_value, existing_value, country_code, app_locale);
}
if (is_duplicate)
« no previous file with comments | « chrome/browser/ui/browser_tab_contents.cc ('k') | chrome/browser/webdata/autofill_profile_syncable_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698