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/common/android/address_parser_internal.h" | 5 #include "content/common/android/address_parser_internal.h" |
6 | 6 |
7 #include <bitset> | 7 #include <bitset> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } else { | 144 } else { |
145 AcceptChars(1); | 145 AcceptChars(1); |
146 ++num_digits_; | 146 ++num_digits_; |
147 } | 147 } |
148 continue; | 148 continue; |
149 } | 149 } |
150 | 150 |
151 if (IsAsciiAlpha(*it_)) { | 151 if (IsAsciiAlpha(*it_)) { |
152 // Handle special case 'one'. | 152 // Handle special case 'one'. |
153 if (result_chars_ == 0) { | 153 if (result_chars_ == 0) { |
154 if (it_ + 3 <= end_ && LowerCaseEqualsASCII(it_, it_ + 3, "one")) | 154 if (it_ + 3 <= end_ && base::LowerCaseEqualsASCII(it_, it_ + 3, "one")) |
155 AcceptChars(3); | 155 AcceptChars(3); |
156 else | 156 else |
157 RestartOnNextDelimiter(); | 157 RestartOnNextDelimiter(); |
158 continue; | 158 continue; |
159 } | 159 } |
160 | 160 |
161 // There should be more than 1 character because of result_chars. | 161 // There should be more than 1 character because of result_chars. |
162 DCHECK_GT(result_chars_, 0U); | 162 DCHECK_GT(result_chars_, 0U); |
163 DCHECK(it_ != begin_); | 163 DCHECK(it_ != begin_); |
164 base::char16 previous = SafePreviousChar(it_, begin_); | 164 base::char16 previous = SafePreviousChar(it_, begin_); |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 } | 619 } |
620 | 620 |
621 return false; | 621 return false; |
622 } | 622 } |
623 | 623 |
624 } // namespace internal | 624 } // namespace internal |
625 | 625 |
626 } // namespace address_parser | 626 } // namespace address_parser |
627 | 627 |
628 } // namespace content | 628 } // namespace content |
OLD | NEW |