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

Unified Diff: third_party/libaddressinput/chromium/cpp/src/rule.h

Issue 237693002: requestAutocomplete should not unlatinize administrative region names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renames Created 6 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: third_party/libaddressinput/chromium/cpp/src/rule.h
diff --git a/third_party/libaddressinput/chromium/cpp/src/rule.h b/third_party/libaddressinput/chromium/cpp/src/rule.h
index cc0a3d7a3b34596505bfa1213d872493a4fc020c..604ec0a152f6431415075b60f5ab9ceee5432fa9 100644
--- a/third_party/libaddressinput/chromium/cpp/src/rule.h
+++ b/third_party/libaddressinput/chromium/cpp/src/rule.h
@@ -166,16 +166,18 @@ class Rule {
// Outputs the sub key for a given user input. For example, Texas will map to
// TX.
+ //
+ // If |keep_input_latin| is true, then does not convert a latinized region
+ // name into a sub key. For example, tOKYo will change to TOKYO. If
+ // |keep_input_latin| is false, then converts a latinized region name into a
+ // sub key. For example, tOKYo becomes 東京都.
+ //
+ // |sub_key| should not be NULL.
bool CanonicalizeSubKey(const std::string& user_input,
+ bool keep_input_latin,
std::string* sub_key) const;
private:
- // Finds |target| in |values| and sets |sub_key| to the associated value from
- // |sub_keys_|, or returns false if |target| is not in |values|.
- bool GetMatchingSubKey(const std::string& target,
- const std::vector<std::string>& values,
- std::string* sub_key) const;
-
std::string key_;
std::string name_;
std::string latin_name_;

Powered by Google App Engine
This is Rietveld 408576698