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

Side by Side Diff: third_party/libaddressinput/chromium/cpp/src/address_ui.cc

Issue 261013010: autocomplete: add ability to get full address (hidden behind a flag). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (C) 2013 Google Inc. 1 // Copyright (C) 2013 Google Inc.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 GetMessageIdForField(field, 201 GetMessageIdForField(field,
202 rule.GetAdminAreaNameMessageId(), 202 rule.GetAdminAreaNameMessageId(),
203 rule.GetPostalCodeNameMessageId()); 203 rule.GetPostalCodeNameMessageId());
204 result.push_back(component); 204 result.push_back(component);
205 } 205 }
206 } 206 }
207 207
208 return result; 208 return result;
209 } 209 }
210 210
211 std::vector<AddressField> GetRequiredFields(const std::string& region_code) {
212 Rule rule;
213 rule.CopyFrom(Rule::GetDefault());
214 if (!rule.ParseSerializedRule(
215 RegionDataConstants::GetRegionData(region_code))) {
216 return std::vector<AddressField>();
217 }
218
219 return rule.GetRequired();
220 }
221
222 const std::string& GetCompactAddressLinesSeparator( 211 const std::string& GetCompactAddressLinesSeparator(
223 const std::string& language_code) { 212 const std::string& language_code) {
224 return RegionDataConstants::GetLanguageCompactLineSeparator(language_code); 213 return RegionDataConstants::GetLanguageCompactLineSeparator(language_code);
225 } 214 }
226 215
227 } // namespace addressinput 216 } // namespace addressinput
228 } // namespace i18n 217 } // namespace i18n
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698