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

Unified Diff: trunk/src/chrome/browser/ui/autofill/country_combobox_model.cc

Issue 388613002: Revert 282408 "Use upstream libaddressinput in Chrome." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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: trunk/src/chrome/browser/ui/autofill/country_combobox_model.cc
===================================================================
--- trunk/src/chrome/browser/ui/autofill/country_combobox_model.cc (revision 282425)
+++ trunk/src/chrome/browser/ui/autofill/country_combobox_model.cc (working copy)
@@ -4,9 +4,6 @@
#include "chrome/browser/ui/autofill/country_combobox_model.h"
-#include <algorithm>
-#include <iterator>
-
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
@@ -17,7 +14,7 @@
// TODO(rouslan): Remove this check. http://crbug.com/337587
#if defined(ENABLE_AUTOFILL_DIALOG)
-#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_ui.h"
+#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_ui.h"
#endif
namespace autofill {
@@ -44,22 +41,12 @@
}
// The sorted list of countries.
- std::vector<std::string> available_countries;
- AutofillCountry::GetAvailableCountries(&available_countries);
-
#if defined(ENABLE_AUTOFILL_DIALOG)
- // Filter out the countries that do not have rules for address input and
- // validation.
- const std::vector<std::string>& addressinput_countries =
+ const std::vector<std::string>& available_countries =
::i18n::addressinput::GetRegionCodes();
- std::vector<std::string> filtered_countries;
- filtered_countries.reserve(available_countries.size());
- std::set_intersection(available_countries.begin(),
- available_countries.end(),
- addressinput_countries.begin(),
- addressinput_countries.end(),
- std::back_inserter(filtered_countries));
- available_countries.swap(filtered_countries);
+#else
+ std::vector<std::string> available_countries;
+ AutofillCountry::GetAvailableCountries(&available_countries);
#endif
std::vector<AutofillCountry*> sorted_countries;

Powered by Google App Engine
This is Rietveld 408576698