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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2010 Google Inc. All Rights Reserved. 3 * Copyright (C) 2010 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ViewportDescription description; 51 ViewportDescription description;
52 bool set; 52 bool set;
53 ViewportDescriptionWrapper() : set(false) {} 53 ViewportDescriptionWrapper() : set(false) {}
54 }; 54 };
55 55
56 struct CORE_EXPORT CachedDocumentParameters { 56 struct CORE_EXPORT CachedDocumentParameters {
57 USING_FAST_MALLOC(CachedDocumentParameters); 57 USING_FAST_MALLOC(CachedDocumentParameters);
58 58
59 public: 59 public:
60 static std::unique_ptr<CachedDocumentParameters> create(Document* document) { 60 static std::unique_ptr<CachedDocumentParameters> create(Document* document) {
61 return wrapUnique(new CachedDocumentParameters(document)); 61 return WTF::wrapUnique(new CachedDocumentParameters(document));
62 } 62 }
63 63
64 static std::unique_ptr<CachedDocumentParameters> create() { 64 static std::unique_ptr<CachedDocumentParameters> create() {
65 return wrapUnique(new CachedDocumentParameters); 65 return WTF::wrapUnique(new CachedDocumentParameters);
66 } 66 }
67 67
68 bool doHtmlPreloadScanning; 68 bool doHtmlPreloadScanning;
69 bool doDocumentWritePreloadScanning; 69 bool doDocumentWritePreloadScanning;
70 Length defaultViewportMinWidth; 70 Length defaultViewportMinWidth;
71 bool viewportMetaZeroValuesQuirk; 71 bool viewportMetaZeroValuesQuirk;
72 bool viewportMetaEnabled; 72 bool viewportMetaEnabled;
73 ReferrerPolicy referrerPolicy; 73 ReferrerPolicy referrerPolicy;
74 74
75 private: 75 private:
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 class CORE_EXPORT HTMLPreloadScanner { 171 class CORE_EXPORT HTMLPreloadScanner {
172 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); 172 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner);
173 USING_FAST_MALLOC(HTMLPreloadScanner); 173 USING_FAST_MALLOC(HTMLPreloadScanner);
174 174
175 public: 175 public:
176 static std::unique_ptr<HTMLPreloadScanner> create( 176 static std::unique_ptr<HTMLPreloadScanner> create(
177 const HTMLParserOptions& options, 177 const HTMLParserOptions& options,
178 const KURL& documentURL, 178 const KURL& documentURL,
179 std::unique_ptr<CachedDocumentParameters> documentParameters, 179 std::unique_ptr<CachedDocumentParameters> documentParameters,
180 const MediaValuesCached::MediaValuesCachedData& mediaValuesCachedData) { 180 const MediaValuesCached::MediaValuesCachedData& mediaValuesCachedData) {
181 return wrapUnique(new HTMLPreloadScanner(options, documentURL, 181 return WTF::wrapUnique(new HTMLPreloadScanner(options, documentURL,
182 std::move(documentParameters), 182 std::move(documentParameters),
183 mediaValuesCachedData)); 183 mediaValuesCachedData));
184 } 184 }
185 185
186 ~HTMLPreloadScanner(); 186 ~HTMLPreloadScanner();
187 187
188 void appendToEnd(const SegmentedString&); 188 void appendToEnd(const SegmentedString&);
189 PreloadRequestStream scan(const KURL& documentBaseElementURL, 189 PreloadRequestStream scan(const KURL& documentBaseElementURL,
190 ViewportDescriptionWrapper*); 190 ViewportDescriptionWrapper*);
191 191
192 private: 192 private:
193 HTMLPreloadScanner(const HTMLParserOptions&, 193 HTMLPreloadScanner(const HTMLParserOptions&,
194 const KURL& documentURL, 194 const KURL& documentURL,
195 std::unique_ptr<CachedDocumentParameters>, 195 std::unique_ptr<CachedDocumentParameters>,
196 const MediaValuesCached::MediaValuesCachedData&); 196 const MediaValuesCached::MediaValuesCachedData&);
197 197
198 TokenPreloadScanner m_scanner; 198 TokenPreloadScanner m_scanner;
199 SegmentedString m_source; 199 SegmentedString m_source;
200 HTMLToken m_token; 200 HTMLToken m_token;
201 std::unique_ptr<HTMLTokenizer> m_tokenizer; 201 std::unique_ptr<HTMLTokenizer> m_tokenizer;
202 }; 202 };
203 203
204 } // namespace blink 204 } // namespace blink
205 205
206 #endif 206 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698