| 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 #include "content/renderer/android/address_detector.h" | 5 #include "content/renderer/android/address_detector.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Maximum number of digits of a house number, including possible hyphens. | 49 // Maximum number of digits of a house number, including possible hyphens. |
| 50 const size_t kMaxHouseDigits = 5; | 50 const size_t kMaxHouseDigits = 5; |
| 51 | 51 |
| 52 // Additional characters used as new line delimiters. | 52 // Additional characters used as new line delimiters. |
| 53 const char16 kNewlineDelimiters[] = { | 53 const char16 kNewlineDelimiters[] = { |
| 54 '\n', | 54 '\n', |
| 55 ',', | 55 ',', |
| 56 '*', | 56 '*', |
| 57 0x2022, // Unicode bullet | 57 0x2022, // Unicode bullet |
| 58 0, |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 char16 SafePreviousChar(const string16::const_iterator& it, | 61 char16 SafePreviousChar(const string16::const_iterator& it, |
| 61 const string16::const_iterator& begin) { | 62 const string16::const_iterator& begin) { |
| 62 if (it == begin) | 63 if (it == begin) |
| 63 return ' '; | 64 return ' '; |
| 64 return *(it - 1); | 65 return *(it - 1); |
| 65 } | 66 } |
| 66 | 67 |
| 67 char16 SafeNextChar(const string16::const_iterator& it, | 68 char16 SafeNextChar(const string16::const_iterator& it, |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 location_names[i].string, | 828 location_names[i].string, |
| 828 location_names[i].allow_plural)) { | 829 location_names[i].allow_plural)) { |
| 829 return true; | 830 return true; |
| 830 } | 831 } |
| 831 } | 832 } |
| 832 | 833 |
| 833 return false; | 834 return false; |
| 834 } | 835 } |
| 835 | 836 |
| 836 } // namespace content | 837 } // namespace content |
| OLD | NEW |