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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/TextResourceDecoder.h

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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) 1999 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 3 Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
4 Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 4 Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 EncodingFromMetaTag, 45 EncodingFromMetaTag,
46 EncodingFromCSSCharset, 46 EncodingFromCSSCharset,
47 EncodingFromHTTPHeader, 47 EncodingFromHTTPHeader,
48 EncodingFromParentFrame 48 EncodingFromParentFrame
49 }; 49 };
50 50
51 static std::unique_ptr<TextResourceDecoder> create( 51 static std::unique_ptr<TextResourceDecoder> create(
52 const String& mimeType, 52 const String& mimeType,
53 const WTF::TextEncoding& defaultEncoding = WTF::TextEncoding(), 53 const WTF::TextEncoding& defaultEncoding = WTF::TextEncoding(),
54 bool usesEncodingDetector = false) { 54 bool usesEncodingDetector = false) {
55 return wrapUnique(new TextResourceDecoder( 55 return WTF::wrapUnique(new TextResourceDecoder(
56 mimeType, defaultEncoding, usesEncodingDetector 56 mimeType, defaultEncoding, usesEncodingDetector
57 ? UseAllAutoDetection 57 ? UseAllAutoDetection
58 : UseContentAndBOMBasedDetection)); 58 : UseContentAndBOMBasedDetection));
59 } 59 }
60 // Corresponds to utf-8 decode in Encoding spec: 60 // Corresponds to utf-8 decode in Encoding spec:
61 // https://encoding.spec.whatwg.org/#utf-8-decode. 61 // https://encoding.spec.whatwg.org/#utf-8-decode.
62 static std::unique_ptr<TextResourceDecoder> createAlwaysUseUTF8ForText() { 62 static std::unique_ptr<TextResourceDecoder> createAlwaysUseUTF8ForText() {
63 return wrapUnique(new TextResourceDecoder("plain/text", UTF8Encoding(), 63 return WTF::wrapUnique(new TextResourceDecoder("plain/text", UTF8Encoding(),
64 AlwaysUseUTF8ForText)); 64 AlwaysUseUTF8ForText));
65 } 65 }
66 ~TextResourceDecoder(); 66 ~TextResourceDecoder();
67 67
68 void setEncoding(const WTF::TextEncoding&, EncodingSource); 68 void setEncoding(const WTF::TextEncoding&, EncodingSource);
69 const WTF::TextEncoding& encoding() const { return m_encoding; } 69 const WTF::TextEncoding& encoding() const { return m_encoding; }
70 bool encodingWasDetectedHeuristically() const { 70 bool encodingWasDetectedHeuristically() const {
71 return m_source == AutoDetectedEncoding || 71 return m_source == AutoDetectedEncoding ||
72 m_source == EncodingFromContentSniffing; 72 m_source == EncodingFromContentSniffing;
73 } 73 }
74 74
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool m_useLenientXMLDecoding; // Don't stop on XML decoding errors. 138 bool m_useLenientXMLDecoding; // Don't stop on XML decoding errors.
139 bool m_sawError; 139 bool m_sawError;
140 EncodingDetectionOption m_encodingDetectionOption; 140 EncodingDetectionOption m_encodingDetectionOption;
141 141
142 std::unique_ptr<HTMLMetaCharsetParser> m_charsetParser; 142 std::unique_ptr<HTMLMetaCharsetParser> m_charsetParser;
143 }; 143 };
144 144
145 } // namespace blink 145 } // namespace blink
146 146
147 #endif 147 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/PreloadRequest.h ('k') | third_party/WebKit/Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698