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

Side by Side Diff: third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_formatter.h

Issue 389863002: Remove Chrome's own version of libaddressinput in favor of the upstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (C) 2014 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // Utility functions for formatting the addresses represented as AddressData.
16 //
17 // Note these work best if the address has a language code specified - this can
18 // be obtained when building the UI components (calling BuildComponents on
19 // address_ui.h).
20
21 #ifndef I18N_ADDRESSINPUT_ADDRESS_FORMATTER_H_
22 #define I18N_ADDRESSINPUT_ADDRESS_FORMATTER_H_
23
24 #include <string>
25 #include <vector>
26
27 namespace i18n {
28 namespace addressinput {
29
30 struct AddressData;
31
32 // Formats the address onto multiple lines. This formats the address in national
33 // format; without the country.
34 void GetFormattedNationalAddress(
35 const AddressData& address_data, std::vector<std::string>* lines);
36
37 // Formats the address as a single line. This formats the address in national
38 // format; without the country.
39 void GetFormattedNationalAddressLine(
40 const AddressData& address_data, std::string* line);
41
42 // Formats the street-level part of an address as a single line. For example,
43 // two lines of "Apt 1", "10 Red St." will be concatenated in a
44 // language-appropriate way, to give something like "Apt 1, 10 Red St".
45 void GetStreetAddressLinesAsSingleLine(
46 const AddressData& address_data, std::string* line);
47
48 } // namespace addressinput
49 } // namespace i18n
50
51 #endif // I18N_ADDRESSINPUT_ADDRESS_FORMATTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698