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

Side by Side Diff: trunk/src/content/common/android/address_parser_internal.cc

Issue 474483002: Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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
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
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_ && base::LowerCaseEqualsASCII(it_, it_ + 3, "one")) 154 if (it_ + 3 <= end_ && 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
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
OLDNEW
« no previous file with comments | « trunk/src/content/common/android/address_parser.cc ('k') | trunk/src/content/public/common/window_container_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698