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

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

Issue 1235563004: Apply meta tag referrer policy for preloaded requests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: style fix Created 5 years, 5 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/dom/Document.cpp ('k') | Source/core/html/parser/CSSPreloadScanner.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 28 matching lines...) Expand all
39 WTF_MAKE_NONCOPYABLE(CSSPreloadScanner); 39 WTF_MAKE_NONCOPYABLE(CSSPreloadScanner);
40 public: 40 public:
41 CSSPreloadScanner(); 41 CSSPreloadScanner();
42 ~CSSPreloadScanner(); 42 ~CSSPreloadScanner();
43 43
44 void reset(); 44 void reset();
45 45
46 void scan(const HTMLToken::DataVector&, const SegmentedString&, PreloadReque stStream&); 46 void scan(const HTMLToken::DataVector&, const SegmentedString&, PreloadReque stStream&);
47 void scan(const String&, const SegmentedString&, PreloadRequestStream&); 47 void scan(const String&, const SegmentedString&, PreloadRequestStream&);
48 48
49 void setReferrerPolicy(const ReferrerPolicy);
50
49 private: 51 private:
50 enum State { 52 enum State {
51 Initial, 53 Initial,
52 MaybeComment, 54 MaybeComment,
53 Comment, 55 Comment,
54 MaybeCommentEnd, 56 MaybeCommentEnd,
55 RuleStart, 57 RuleStart,
56 Rule, 58 Rule,
57 AfterRule, 59 AfterRule,
58 RuleValue, 60 RuleValue,
59 AfterRuleValue, 61 AfterRuleValue,
60 DoneParsingImportRules, 62 DoneParsingImportRules,
61 }; 63 };
62 64
63 template<typename Char> 65 template<typename Char>
64 void scanCommon(const Char* begin, const Char* end, const SegmentedString&, PreloadRequestStream&); 66 void scanCommon(const Char* begin, const Char* end, const SegmentedString&, PreloadRequestStream&);
65 67
66 inline void tokenize(UChar, const SegmentedString&); 68 inline void tokenize(UChar, const SegmentedString&);
67 void emitRule(const SegmentedString&); 69 void emitRule(const SegmentedString&);
68 70
69 State m_state; 71 State m_state;
70 StringBuilder m_rule; 72 StringBuilder m_rule;
71 StringBuilder m_ruleValue; 73 StringBuilder m_ruleValue;
72 74
73 // Only non-zero during scan() 75 // Only non-zero during scan()
74 PreloadRequestStream* m_requests; 76 PreloadRequestStream* m_requests;
77
78 ReferrerPolicy m_referrerPolicy;
75 }; 79 };
76 80
77 } 81 }
78 82
79 #endif 83 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/parser/CSSPreloadScanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698