| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  150       } else { |  150       } else { | 
|  151         AcceptChars(1); |  151         AcceptChars(1); | 
|  152         ++num_digits_; |  152         ++num_digits_; | 
|  153       } |  153       } | 
|  154       continue; |  154       continue; | 
|  155     } |  155     } | 
|  156  |  156  | 
|  157     if (IsAsciiAlpha(*it_)) { |  157     if (IsAsciiAlpha(*it_)) { | 
|  158       // Handle special case 'one'. |  158       // Handle special case 'one'. | 
|  159       if (result_chars_ == 0) { |  159       if (result_chars_ == 0) { | 
|  160         if (it_ + 3 <= end_ && LowerCaseEqualsASCII(it_, it_ + 3, "one")) |  160         if (it_ + 3 <= end_ && base::LowerCaseEqualsASCII(it_, it_ + 3, "one")) | 
|  161           AcceptChars(3); |  161           AcceptChars(3); | 
|  162         else |  162         else | 
|  163           RestartOnNextDelimiter(); |  163           RestartOnNextDelimiter(); | 
|  164         continue; |  164         continue; | 
|  165       } |  165       } | 
|  166  |  166  | 
|  167       // There should be more than 1 character because of result_chars. |  167       // There should be more than 1 character because of result_chars. | 
|  168       DCHECK_GT(result_chars_, 0U); |  168       DCHECK_GT(result_chars_, 0U); | 
|  169       DCHECK(it_ != begin_); |  169       DCHECK(it_ != begin_); | 
|  170       base::char16 previous = SafePreviousChar(it_, begin_); |  170       base::char16 previous = SafePreviousChar(it_, begin_); | 
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  625   } |  625   } | 
|  626  |  626  | 
|  627   return false; |  627   return false; | 
|  628 } |  628 } | 
|  629  |  629  | 
|  630 } // namespace internal |  630 } // namespace internal | 
|  631  |  631  | 
|  632 } // namespace address_parser |  632 } // namespace address_parser | 
|  633  |  633  | 
|  634 }  // namespace content |  634 }  // namespace content | 
| OLD | NEW |