| OLD | NEW |
| 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 LinkParameterCrossOrigin, | 28 LinkParameterCrossOrigin, |
| 29 }; | 29 }; |
| 30 | 30 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 49 private: | 49 private: |
| 50 template <typename CharType> | 50 template <typename CharType> |
| 51 void init(CharType* headerValue, unsigned len); | 51 void init(CharType* headerValue, unsigned len); |
| 52 | 52 |
| 53 Vector<LinkHeader> m_headerSet; | 53 Vector<LinkHeader> m_headerSet; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } | 56 } |
| 57 | 57 |
| 58 #endif | 58 #endif |
| OLD | NEW |