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

Side by Side Diff: Source/core/html/parser/HTMLMetaCharsetParser.cpp

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 static const char charsetString[] = "charset"; 55 static const char charsetString[] = "charset";
56 static const size_t charsetLength = sizeof("charset") - 1; 56 static const size_t charsetLength = sizeof("charset") - 1;
57 57
58 String HTMLMetaCharsetParser::extractCharset(const String& value) 58 String HTMLMetaCharsetParser::extractCharset(const String& value)
59 { 59 {
60 size_t pos = 0; 60 size_t pos = 0;
61 unsigned length = value.length(); 61 unsigned length = value.length();
62 62
63 while (pos < length) { 63 while (pos < length) {
64 pos = value.find(charsetString, pos, false); 64 pos = value.find(charsetString, pos, false);
65 if (pos == notFound) 65 if (pos == kNotFound)
66 break; 66 break;
67 67
68 pos += charsetLength; 68 pos += charsetLength;
69 69
70 // Skip whitespace. 70 // Skip whitespace.
71 while (pos < length && value[pos] <= ' ') 71 while (pos < length && value[pos] <= ' ')
72 ++pos; 72 ++pos;
73 73
74 if (value[pos] != '=') 74 if (value[pos] != '=')
75 continue; 75 continue;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 return true; 201 return true;
202 } 202 }
203 203
204 m_token.clear(); 204 m_token.clear();
205 } 205 }
206 206
207 return false; 207 return false;
208 } 208 }
209 209
210 } 210 }
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLFormattingElementList.cpp ('k') | Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698