OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef LinkHeader_h |
| 6 #define LinkHeader_h |
| 7 |
| 8 #include "wtf/text/WTFString.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class LinkHeader { |
| 13 public: |
| 14 LinkHeader(const String& header); |
| 15 |
| 16 const String url() const { return m_url; }; |
| 17 const String rel() const { return m_rel; }; |
| 18 bool valid() const { return m_isValid; }; |
| 19 |
| 20 enum LinkParameterName { |
| 21 LinkParameterUnknown, |
| 22 LinkParameterRel, |
| 23 }; |
| 24 |
| 25 private: |
| 26 template <typename CharType> |
| 27 bool init(CharType* headerValue, unsigned len); |
| 28 void setValue(LinkParameterName, String value); |
| 29 |
| 30 String m_url; |
| 31 String m_rel; |
| 32 bool m_isValid; |
| 33 }; |
| 34 |
| 35 } |
| 36 |
| 37 #endif |
OLD | NEW |