| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_ADDRESS_PARSER_INTERNAL_H_ | 5 #ifndef CONTENT_COMMON_ADDRESS_PARSER_INTERNAL_H_ |
| 6 #define CONTENT_COMMON_ADDRESS_PARSER_INTERNAL_H_ | 6 #define CONTENT_COMMON_ADDRESS_PARSER_INTERNAL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string_tokenizer.h" | 10 #include "base/strings/string_tokenizer.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 namespace address_parser { | 15 namespace address_parser { |
| 16 | 16 |
| 17 // Internal classes and functions for address parsing. | 17 // Internal classes and functions for address parsing. |
| 18 namespace internal { | 18 namespace internal { |
| 19 | 19 |
| 20 // Exposed for tests. | 20 // Exposed for tests. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 size_t num_digits_; | 56 size_t num_digits_; |
| 57 | 57 |
| 58 // Number of characters previous to the current iterator that belong | 58 // Number of characters previous to the current iterator that belong |
| 59 // to the current result candidate. | 59 // to the current result candidate. |
| 60 size_t result_chars_; | 60 size_t result_chars_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(HouseNumberParser); | 62 DISALLOW_COPY_AND_ASSIGN(HouseNumberParser); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 typedef std::vector<Word> WordList; | 65 typedef std::vector<Word> WordList; |
| 66 typedef StringTokenizerT<string16, string16::const_iterator> | 66 typedef base::StringTokenizerT<string16, string16::const_iterator> |
| 67 String16Tokenizer; | 67 String16Tokenizer; |
| 68 | 68 |
| 69 // These are exposed for tests. | 69 // These are exposed for tests. |
| 70 CONTENT_EXPORT bool FindStateStartingInWord(WordList* words, | 70 CONTENT_EXPORT bool FindStateStartingInWord(WordList* words, |
| 71 size_t state_first_word, | 71 size_t state_first_word, |
| 72 size_t* state_last_word, | 72 size_t* state_last_word, |
| 73 String16Tokenizer* tokenizer, | 73 String16Tokenizer* tokenizer, |
| 74 size_t* state_index); | 74 size_t* state_index); |
| 75 | 75 |
| 76 CONTENT_EXPORT bool IsValidLocationName(const Word& word); | 76 CONTENT_EXPORT bool IsValidLocationName(const Word& word); |
| 77 CONTENT_EXPORT bool IsZipValid(const Word& word, size_t state_index); | 77 CONTENT_EXPORT bool IsZipValid(const Word& word, size_t state_index); |
| 78 CONTENT_EXPORT bool IsZipValidForState(const Word& word, size_t state_index); | 78 CONTENT_EXPORT bool IsZipValidForState(const Word& word, size_t state_index); |
| 79 | 79 |
| 80 } // namespace internal | 80 } // namespace internal |
| 81 | 81 |
| 82 } // namespace address_parser | 82 } // namespace address_parser |
| 83 | 83 |
| 84 } // namespace content | 84 } // namespace content |
| 85 | 85 |
| 86 #endif // CONTENT_COMMON_ADDRESS_PARSER_INTERNAL_H_ | 86 #endif // CONTENT_COMMON_ADDRESS_PARSER_INTERNAL_H_ |
| OLD | NEW |