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

Unified Diff: third_party/WebKit/Source/core/loader/LinkHeader.h

Issue 1811163002: Share link header parsing code between blink and content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base-optional
Patch Set: rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/loader/LinkHeader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/LinkHeader.h
diff --git a/third_party/WebKit/Source/core/loader/LinkHeader.h b/third_party/WebKit/Source/core/loader/LinkHeader.h
deleted file mode 100644
index 90c6700d5ca01ab3f3692e28c1f6cde17d7efaf1..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/loader/LinkHeader.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef LinkHeader_h
-#define LinkHeader_h
-
-#include "core/CoreExport.h"
-#include "core/html/CrossOriginAttribute.h"
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
-
-namespace blink {
-
-class LinkHeader {
- DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
-public:
- template <typename CharType>
- LinkHeader(CharType*& position, CharType* end);
-
- const String& url() const { return m_url; }
- const String& rel() const { return m_rel; }
- const String& as() const { return m_as; }
- const String& mimeType() const { return m_mimeType; }
- const String& media() const { return m_media; }
- CrossOriginAttributeValue crossOrigin() const { return m_crossOrigin; }
- bool valid() const { return m_isValid; }
-
- enum LinkParameterName {
- LinkParameterRel,
- LinkParameterAnchor,
- LinkParameterTitle,
- LinkParameterMedia,
- LinkParameterType,
- LinkParameterRev,
- LinkParameterHreflang,
- // Beyond this point, only link-extension parameters
- LinkParameterUnknown,
- LinkParameterCrossOrigin,
- LinkParameterAs,
- };
-
-private:
- void setValue(LinkParameterName, String value);
-
- String m_url;
- String m_rel;
- String m_as;
- String m_mimeType;
- String m_media;
- CrossOriginAttributeValue m_crossOrigin;
- bool m_isValid;
-};
-
-class CORE_EXPORT LinkHeaderSet {
- STACK_ALLOCATED();
-public:
- LinkHeaderSet(const String& header);
-
- Vector<LinkHeader>::const_iterator begin() const { return m_headerSet.begin(); }
- Vector<LinkHeader>::const_iterator end() const { return m_headerSet.end(); }
- LinkHeader& operator[](size_t i) { return m_headerSet[i]; }
- size_t size() { return m_headerSet.size(); }
-
-private:
- template <typename CharType>
- void init(CharType* headerValue, unsigned len);
-
- Vector<LinkHeader> m_headerSet;
-};
-
-} // namespace blink
-
-#endif
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/loader/LinkHeader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698