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

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

Issue 889883002: Add a parser for Link headers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: proper expected files. Less polluting tests Created 5 years, 10 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/core.gypi ('k') | Source/core/loader/LinkHeader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/loader/LinkHeader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698