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

Side by Side Diff: Source/core/html/parser/HTMLPreloadScanner.h

Issue 1121263002: Add Accept-CH meta http-equiv support to the preloader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review nits Created 5 years, 7 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
« no previous file with comments | « Source/core/fetch/FetchRequest.h ('k') | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 CSSPreloadScanner m_cssScanner; 110 CSSPreloadScanner m_cssScanner;
111 const KURL m_documentURL; 111 const KURL m_documentURL;
112 KURL m_predictedBaseElementURL; 112 KURL m_predictedBaseElementURL;
113 bool m_inStyle; 113 bool m_inStyle;
114 bool m_inPicture; 114 bool m_inPicture;
115 bool m_isAppCacheEnabled; 115 bool m_isAppCacheEnabled;
116 bool m_isCSPEnabled; 116 bool m_isCSPEnabled;
117 String m_pictureSourceURL; 117 String m_pictureSourceURL;
118 size_t m_templateCount; 118 size_t m_templateCount;
119 OwnPtr<CachedDocumentParameters> m_documentParameters; 119 OwnPtr<CachedDocumentParameters> m_documentParameters;
120 ClientHintsPreferences m_clientHintsPreferences;
120 121
121 Vector<Checkpoint> m_checkpoints; 122 Vector<Checkpoint> m_checkpoints;
122 }; 123 };
123 124
124 class CORE_EXPORT HTMLPreloadScanner { 125 class CORE_EXPORT HTMLPreloadScanner {
125 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED(HTMLPreloa dScanner); 126 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED(HTMLPreloa dScanner);
126 public: 127 public:
127 static PassOwnPtr<HTMLPreloadScanner> create(const HTMLParserOptions& option s, const KURL& documentURL, PassOwnPtr<CachedDocumentParameters> documentParamet ers) 128 static PassOwnPtr<HTMLPreloadScanner> create(const HTMLParserOptions& option s, const KURL& documentURL, PassOwnPtr<CachedDocumentParameters> documentParamet ers)
128 { 129 {
129 return adoptPtr(new HTMLPreloadScanner(options, documentURL, documentPar ameters)); 130 return adoptPtr(new HTMLPreloadScanner(options, documentURL, documentPar ameters));
130 } 131 }
131 132
132 133
133 HTMLPreloadScanner(const HTMLParserOptions&, const KURL& documentURL, PassOw nPtr<CachedDocumentParameters>); 134 HTMLPreloadScanner(const HTMLParserOptions&, const KURL& documentURL, PassOw nPtr<CachedDocumentParameters>);
134 ~HTMLPreloadScanner(); 135 ~HTMLPreloadScanner();
135 136
136 void appendToEnd(const SegmentedString&); 137 void appendToEnd(const SegmentedString&);
137 void scan(ResourcePreloader*, const KURL& documentBaseElementURL); 138 void scan(ResourcePreloader*, const KURL& documentBaseElementURL);
138 139
139 private: 140 private:
140 TokenPreloadScanner m_scanner; 141 TokenPreloadScanner m_scanner;
141 SegmentedString m_source; 142 SegmentedString m_source;
142 HTMLToken m_token; 143 HTMLToken m_token;
143 OwnPtr<HTMLTokenizer> m_tokenizer; 144 OwnPtr<HTMLTokenizer> m_tokenizer;
144 }; 145 };
145 146
146 } 147 }
147 148
148 #endif 149 #endif
OLDNEW
« no previous file with comments | « Source/core/fetch/FetchRequest.h ('k') | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698