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

Side by Side Diff: third_party/WebKit/Source/platform/network/LinkHeader.cpp

Issue 2175123002: Move platform/ParsingUtilities.h to wtf/text/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I keep forgetting this bit... Created 4 years, 5 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
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 #include "platform/network/LinkHeader.h" 5 #include "platform/network/LinkHeader.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "components/link_header_util/link_header_util.h" 8 #include "components/link_header_util/link_header_util.h"
9 #include "platform/ParsingUtilities.h" 9 #include "wtf/text/ParsingUtilities.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 // Verify that the parameter is a link-extension which according to spec doesn't have to have a value. 13 // Verify that the parameter is a link-extension which according to spec doesn't have to have a value.
14 static bool isExtensionParameter(LinkHeader::LinkParameterName name) 14 static bool isExtensionParameter(LinkHeader::LinkParameterName name)
15 { 15 {
16 return name >= LinkHeader::LinkParameterUnknown; 16 return name >= LinkHeader::LinkParameterUnknown;
17 } 17 }
18 18
19 static LinkHeader::LinkParameterName parameterNameFromString(base::StringPiece n ame) 19 static LinkHeader::LinkParameterName parameterNameFromString(base::StringPiece n ame)
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (header.isNull()) 80 if (header.isNull())
81 return; 81 return;
82 82
83 DCHECK(header.is8Bit()) << "Headers should always be 8 bit"; 83 DCHECK(header.is8Bit()) << "Headers should always be 8 bit";
84 std::string headerString(reinterpret_cast<const char*>(header.characters8()) , header.length()); 84 std::string headerString(reinterpret_cast<const char*>(header.characters8()) , header.length());
85 for (const auto& value : link_header_util::SplitLinkHeader(headerString)) 85 for (const auto& value : link_header_util::SplitLinkHeader(headerString))
86 m_headerSet.append(LinkHeader(value.first, value.second)); 86 m_headerSet.append(LinkHeader(value.first, value.second));
87 } 87 }
88 88
89 } // namespace blink 89 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsers.cpp ('k') | third_party/WebKit/Source/platform/weborigin/Suborigin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698