OLD | NEW |
(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, |
| 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_ |
OLD | NEW |