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

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

Issue 108313015: Make calls to AtomicString(const String&) explicit in html/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take feedback into consideration Created 6 years, 11 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
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return m_encoding.isValid(); 114 return m_encoding.isValid();
115 } 115 }
116 116
117 WTF::TextEncoding HTMLMetaCharsetParser::encodingFromMetaAttributes(const Attrib uteList& attributes) 117 WTF::TextEncoding HTMLMetaCharsetParser::encodingFromMetaAttributes(const Attrib uteList& attributes)
118 { 118 {
119 bool gotPragma = false; 119 bool gotPragma = false;
120 Mode mode = None; 120 Mode mode = None;
121 String charset; 121 String charset;
122 122
123 for (AttributeList::const_iterator iter = attributes.begin(); iter != attrib utes.end(); ++iter) { 123 for (AttributeList::const_iterator iter = attributes.begin(); iter != attrib utes.end(); ++iter) {
124 const AtomicString& attributeName = iter->first; 124 const AtomicString& attributeName = AtomicString(iter->first);
125 const String& attributeValue = iter->second; 125 const String& attributeValue = iter->second;
126 126
127 if (attributeName == http_equivAttr) { 127 if (attributeName == http_equivAttr) {
128 if (equalIgnoringCase(attributeValue, "content-type")) 128 if (equalIgnoringCase(attributeValue, "content-type"))
129 gotPragma = true; 129 gotPragma = true;
130 } else if (charset.isEmpty()) { 130 } else if (charset.isEmpty()) {
131 if (attributeName == charsetAttr) { 131 if (attributeName == charsetAttr) {
132 charset = attributeValue; 132 charset = attributeValue;
133 mode = Charset; 133 mode = Charset;
134 } else if (attributeName == contentAttr) { 134 } else if (attributeName == contentAttr) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return true; 200 return true;
201 } 201 }
202 202
203 m_token.clear(); 203 m_token.clear();
204 } 204 }
205 205
206 return false; 206 return false;
207 } 207 }
208 208
209 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698