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

Side by Side Diff: components/link_header_util/link_header_util.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: address mmenke's comments Created 4 years, 8 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
(Empty)
1 // Copyright 2016 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 COMPONENTS_LINK_HEADER_UTIL_LINK_HEADER_UTIL_H_
6 #define COMPONENTS_LINK_HEADER_UTIL_LINK_HEADER_UTIL_H_
7
8 #include <string>
9 #include <unordered_map>
10 #include <vector>
11
12 #include "base/macros.h"
13 #include "base/optional.h"
14
15 namespace link_header_util {
16
17 using StringIteratorPair =
18 std::pair<std::string::const_iterator, std::string::const_iterator>;
19
20 std::vector<StringIteratorPair> SplitLinkHeader(const std::string& header);
21 bool ParseLinkHeaderValue(
22 std::string::const_iterator begin,
23 std::string::const_iterator end,
esprehn 2016/04/27 08:10:17 why doesn't this take a const std::string& instead
Marijn Kruisselbrink 2016/05/11 00:36:55 It takes the output from SplitLinkHeader, and pars
24 std::string* url,
25 std::unordered_map<std::string, base::Optional<std::string>>* params);
26
27 } // namespace link_header_util
28
29 #endif // COMPONENTS_LINK_HEADER_UTIL_LINK_HEADER_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698