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

Side by Side Diff: Source/core/loader/LinkHeader.h

Issue 1322543003: Fix Link header parsing bug with extension parameter parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed valid char to match the spec Created 5 years, 3 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 | « no previous file | Source/core/loader/LinkHeader.cpp » ('j') | Source/core/loader/LinkHeader.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LinkHeader_h 5 #ifndef LinkHeader_h
6 #define LinkHeader_h 6 #define LinkHeader_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/html/CrossOriginAttribute.h" 9 #include "core/html/CrossOriginAttribute.h"
10 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LinkHeader { 14 class LinkHeader {
15 public: 15 public:
16 template <typename CharType> 16 template <typename CharType>
17 LinkHeader(CharType*& position, CharType* end); 17 LinkHeader(CharType*& position, CharType* end);
18 18
19 const String& url() const { return m_url; } 19 const String& url() const { return m_url; }
20 const String& rel() const { return m_rel; } 20 const String& rel() const { return m_rel; }
21 CrossOriginAttributeValue crossOrigin() const { return m_crossOrigin; } 21 CrossOriginAttributeValue crossOrigin() const { return m_crossOrigin; }
22 bool valid() const { return m_isValid; } 22 bool valid() const { return m_isValid; }
23 23
24 enum LinkParameterName { 24 enum LinkParameterName {
25 LinkParameterUnknown, 25 LinkParameterUnknown,
26 LinkParameterRel, 26 LinkParameterRel,
27 LinkParameterAnchor, 27 LinkParameterAnchor,
28 // Beyond this point, only link-extension parameters
28 LinkParameterCrossOrigin, 29 LinkParameterCrossOrigin,
29 }; 30 };
30 31
31 private: 32 private:
32 void setValue(LinkParameterName, String value); 33 void setValue(LinkParameterName, String value);
33 34
34 String m_url; 35 String m_url;
35 String m_rel; 36 String m_rel;
36 CrossOriginAttributeValue m_crossOrigin; 37 CrossOriginAttributeValue m_crossOrigin;
37 bool m_isValid; 38 bool m_isValid;
(...skipping 11 matching lines...) Expand all
49 private: 50 private:
50 template <typename CharType> 51 template <typename CharType>
51 void init(CharType* headerValue, unsigned len); 52 void init(CharType* headerValue, unsigned len);
52 53
53 Vector<LinkHeader> m_headerSet; 54 Vector<LinkHeader> m_headerSet;
54 }; 55 };
55 56
56 } 57 }
57 58
58 #endif 59 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/LinkHeader.cpp » ('j') | Source/core/loader/LinkHeader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698