juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 1 | // Copyright 2017 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 | #include "net/reporting/reporting_header_parser.h" |
| 6 | |
| 7 | #include <string> |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 8 | #include <utility> |
| 9 | #include <vector> |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 10 | |
Julia Tuttle | ec467a5f | 2018-02-22 20:22:45 | [diff] [blame] | 11 | #include "base/bind.h" |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 12 | #include "base/json/json_reader.h" |
| 13 | #include "base/logging.h" |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 14 | #include "base/metrics/histogram_macros.h" |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 15 | #include "base/time/time.h" |
| 16 | #include "base/values.h" |
Lily Chen | a5b78cff | 2019-07-19 22:10:52 | [diff] [blame] | 17 | #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 18 | #include "net/reporting/reporting_cache.h" |
juliatuttle | ee4b55e | 2017-04-07 17:09:45 | [diff] [blame] | 19 | #include "net/reporting/reporting_context.h" |
juliatuttle | 58754891 | 2017-05-23 14:17:21 | [diff] [blame] | 20 | #include "net/reporting/reporting_delegate.h" |
Lily Chen | fc92ff4 | 2019-05-06 22:59:10 | [diff] [blame] | 21 | #include "net/reporting/reporting_endpoint.h" |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 22 | |
| 23 | namespace net { |
| 24 | |
| 25 | namespace { |
| 26 | |
Douglas Creager | 134b52e | 2018-11-09 18:00:14 | [diff] [blame] | 27 | using HeaderEndpointGroupOutcome = |
| 28 | ReportingHeaderParser::HeaderEndpointGroupOutcome; |
| 29 | using HeaderEndpointOutcome = ReportingHeaderParser::HeaderEndpointOutcome; |
| 30 | using HeaderOutcome = ReportingHeaderParser::HeaderOutcome; |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 31 | |
| 32 | void RecordHeaderOutcome(HeaderOutcome outcome) { |
Douglas Creager | 134b52e | 2018-11-09 18:00:14 | [diff] [blame] | 33 | UMA_HISTOGRAM_ENUMERATION(ReportingHeaderParser::kHeaderOutcomeHistogram, |
| 34 | outcome, HeaderOutcome::MAX); |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 35 | } |
| 36 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 37 | void RecordHeaderEndpointGroupOutcome(HeaderEndpointGroupOutcome outcome) { |
Douglas Creager | 134b52e | 2018-11-09 18:00:14 | [diff] [blame] | 38 | UMA_HISTOGRAM_ENUMERATION( |
| 39 | ReportingHeaderParser::kHeaderEndpointGroupOutcomeHistogram, outcome, |
| 40 | HeaderEndpointGroupOutcome::MAX); |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 41 | } |
| 42 | |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 43 | void RecordHeaderEndpointOutcome(HeaderEndpointOutcome outcome) { |
Douglas Creager | 134b52e | 2018-11-09 18:00:14 | [diff] [blame] | 44 | UMA_HISTOGRAM_ENUMERATION( |
| 45 | ReportingHeaderParser::kHeaderEndpointOutcomeHistogram, outcome, |
| 46 | HeaderEndpointOutcome::MAX); |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 47 | } |
| 48 | |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 49 | const char kUrlKey[] = "url"; |
Douglas Creager | bca6442 | 2018-06-18 13:54:42 | [diff] [blame] | 50 | const char kIncludeSubdomainsKey[] = "include_subdomains"; |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 51 | const char kEndpointsKey[] = "endpoints"; |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 52 | const char kGroupKey[] = "group"; |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 53 | const char kDefaultGroupName[] = "default"; |
Douglas Creager | bca6442 | 2018-06-18 13:54:42 | [diff] [blame] | 54 | const char kMaxAgeKey[] = "max_age"; |
Julia Tuttle | d56350d | 2017-12-07 19:11:17 | [diff] [blame] | 55 | const char kPriorityKey[] = "priority"; |
| 56 | const char kWeightKey[] = "weight"; |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 57 | |
Julia Tuttle | 443a0a68 | 2017-12-04 16:16:26 | [diff] [blame] | 58 | // Processes a single endpoint tuple received in a Report-To header. |
| 59 | // |
| 60 | // |origin| is the origin that sent the Report-To header. |
| 61 | // |
| 62 | // |value| is the parsed JSON value of the endpoint tuple. |
| 63 | // |
| 64 | // |*endpoint_out| will contain the endpoint URL parsed out of the tuple. |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 65 | HeaderEndpointOutcome ProcessEndpoint( |
| 66 | ReportingDelegate* delegate, |
| 67 | const url::Origin& origin, |
| 68 | const base::Value& value, |
Lily Chen | fc92ff4 | 2019-05-06 22:59:10 | [diff] [blame] | 69 | ReportingEndpoint::EndpointInfo* endpoint_info_out) { |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 70 | const base::DictionaryValue* dict = nullptr; |
| 71 | if (!value.GetAsDictionary(&dict)) |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 72 | return HeaderEndpointOutcome::DISCARDED_NOT_DICTIONARY; |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 73 | DCHECK(dict); |
| 74 | |
| 75 | std::string endpoint_url_string; |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 76 | if (!dict->HasKey(kUrlKey)) |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 77 | return HeaderEndpointOutcome::DISCARDED_URL_MISSING; |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 78 | if (!dict->GetString(kUrlKey, &endpoint_url_string)) |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 79 | return HeaderEndpointOutcome::DISCARDED_URL_NOT_STRING; |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 80 | |
| 81 | GURL endpoint_url(endpoint_url_string); |
| 82 | if (!endpoint_url.is_valid()) |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 83 | return HeaderEndpointOutcome::DISCARDED_URL_INVALID; |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 84 | if (!endpoint_url.SchemeIsCryptographic()) |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 85 | return HeaderEndpointOutcome::DISCARDED_URL_INSECURE; |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 86 | endpoint_info_out->url = std::move(endpoint_url); |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 87 | |
Lily Chen | fc92ff4 | 2019-05-06 22:59:10 | [diff] [blame] | 88 | int priority = ReportingEndpoint::EndpointInfo::kDefaultPriority; |
Julia Tuttle | d56350d | 2017-12-07 19:11:17 | [diff] [blame] | 89 | if (dict->HasKey(kPriorityKey) && !dict->GetInteger(kPriorityKey, &priority)) |
| 90 | return HeaderEndpointOutcome::DISCARDED_PRIORITY_NOT_INTEGER; |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 91 | if (priority < 0) |
| 92 | return HeaderEndpointOutcome::DISCARDED_PRIORITY_NEGATIVE; |
| 93 | endpoint_info_out->priority = priority; |
Julia Tuttle | d56350d | 2017-12-07 19:11:17 | [diff] [blame] | 94 | |
Lily Chen | fc92ff4 | 2019-05-06 22:59:10 | [diff] [blame] | 95 | int weight = ReportingEndpoint::EndpointInfo::kDefaultWeight; |
Julia Tuttle | d56350d | 2017-12-07 19:11:17 | [diff] [blame] | 96 | if (dict->HasKey(kWeightKey) && !dict->GetInteger(kWeightKey, &weight)) |
| 97 | return HeaderEndpointOutcome::DISCARDED_WEIGHT_NOT_INTEGER; |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 98 | if (weight < 0) |
| 99 | return HeaderEndpointOutcome::DISCARDED_WEIGHT_NEGATIVE; |
| 100 | endpoint_info_out->weight = weight; |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 101 | |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 102 | if (!delegate->CanSetClient(origin, endpoint_url)) |
| 103 | return HeaderEndpointOutcome::SET_REJECTED_BY_DELEGATE; |
| 104 | |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 105 | return HeaderEndpointOutcome::SET; |
juliatuttle | 58754891 | 2017-05-23 14:17:21 | [diff] [blame] | 106 | } |
| 107 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 108 | // Processes a single endpoint group tuple received in a Report-To header. |
| 109 | // |
| 110 | // |origin| is the origin that sent the Report-To header. |
| 111 | // |
| 112 | // |value| is the parsed JSON value of the endpoint group tuple. |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 113 | HeaderEndpointGroupOutcome ProcessEndpointGroup( |
| 114 | ReportingDelegate* delegate, |
| 115 | ReportingCache* cache, |
| 116 | const url::Origin& origin, |
| 117 | const base::Value& value, |
| 118 | ReportingEndpointGroup* parsed_endpoint_group_out) { |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 119 | const base::DictionaryValue* dict = nullptr; |
| 120 | if (!value.GetAsDictionary(&dict)) |
| 121 | return HeaderEndpointGroupOutcome::DISCARDED_NOT_DICTIONARY; |
| 122 | DCHECK(dict); |
| 123 | |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 124 | std::string group_name = kDefaultGroupName; |
| 125 | if (dict->HasKey(kGroupKey) && !dict->GetString(kGroupKey, &group_name)) |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 126 | return HeaderEndpointGroupOutcome::DISCARDED_GROUP_NOT_STRING; |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 127 | parsed_endpoint_group_out->name = std::move(group_name); |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 128 | |
| 129 | int ttl_sec = -1; |
| 130 | if (!dict->HasKey(kMaxAgeKey)) |
| 131 | return HeaderEndpointGroupOutcome::DISCARDED_TTL_MISSING; |
| 132 | if (!dict->GetInteger(kMaxAgeKey, &ttl_sec)) |
| 133 | return HeaderEndpointGroupOutcome::DISCARDED_TTL_NOT_INTEGER; |
| 134 | if (ttl_sec < 0) |
| 135 | return HeaderEndpointGroupOutcome::DISCARDED_TTL_NEGATIVE; |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 136 | // max_age: 0 signifies removal of the endpoint group. |
| 137 | if (ttl_sec == 0) { |
| 138 | cache->RemoveEndpointGroup(origin, group_name); |
| 139 | return HeaderEndpointGroupOutcome::REMOVED_TTL_ZERO; |
| 140 | } |
| 141 | parsed_endpoint_group_out->ttl = base::TimeDelta::FromSeconds(ttl_sec); |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 142 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 143 | bool subdomains_bool = false; |
| 144 | if (dict->HasKey(kIncludeSubdomainsKey) && |
| 145 | dict->GetBoolean(kIncludeSubdomainsKey, &subdomains_bool) && |
| 146 | subdomains_bool == true) { |
Lily Chen | a5b78cff | 2019-07-19 22:10:52 | [diff] [blame] | 147 | // Disallow eTLDs from setting include_subdomains endpoint groups. |
| 148 | if (registry_controlled_domains::GetRegistryLength( |
| 149 | origin.GetURL(), |
| 150 | registry_controlled_domains::INCLUDE_UNKNOWN_REGISTRIES, |
| 151 | registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES) == 0) { |
| 152 | return HeaderEndpointGroupOutcome:: |
| 153 | DISCARDED_INCLUDE_SUBDOMAINS_NOT_ALLOWED; |
| 154 | } |
| 155 | |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 156 | parsed_endpoint_group_out->include_subdomains = OriginSubdomains::INCLUDE; |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | const base::ListValue* endpoint_list = nullptr; |
| 160 | if (!dict->HasKey(kEndpointsKey)) |
| 161 | return HeaderEndpointGroupOutcome::DISCARDED_ENDPOINTS_MISSING; |
| 162 | if (!dict->GetList(kEndpointsKey, &endpoint_list)) |
| 163 | return HeaderEndpointGroupOutcome::DISCARDED_ENDPOINTS_NOT_LIST; |
| 164 | |
Lily Chen | fc92ff4 | 2019-05-06 22:59:10 | [diff] [blame] | 165 | std::vector<ReportingEndpoint::EndpointInfo> endpoints; |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 166 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 167 | for (size_t i = 0; i < endpoint_list->GetSize(); i++) { |
| 168 | const base::Value* endpoint = nullptr; |
| 169 | bool got_endpoint = endpoint_list->Get(i, &endpoint); |
| 170 | DCHECK(got_endpoint); |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 171 | |
Lily Chen | fc92ff4 | 2019-05-06 22:59:10 | [diff] [blame] | 172 | ReportingEndpoint::EndpointInfo parsed_endpoint; |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 173 | |
| 174 | HeaderEndpointOutcome outcome = |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 175 | ProcessEndpoint(delegate, origin, *endpoint, &parsed_endpoint); |
| 176 | |
| 177 | if (outcome == HeaderEndpointOutcome::SET) |
| 178 | endpoints.push_back(std::move(parsed_endpoint)); |
| 179 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 180 | RecordHeaderEndpointOutcome(outcome); |
| 181 | } |
| 182 | |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 183 | // Remove the group if it is empty. |
| 184 | if (endpoints.empty()) { |
| 185 | cache->RemoveEndpointGroup(origin, group_name); |
| 186 | return HeaderEndpointGroupOutcome::REMOVED_EMPTY; |
| 187 | } |
| 188 | |
| 189 | parsed_endpoint_group_out->endpoints = std::move(endpoints); |
| 190 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 191 | return HeaderEndpointGroupOutcome::PARSED; |
| 192 | } |
| 193 | |
juliatuttle | 58754891 | 2017-05-23 14:17:21 | [diff] [blame] | 194 | } // namespace |
| 195 | |
| 196 | // static |
Douglas Creager | 134b52e | 2018-11-09 18:00:14 | [diff] [blame] | 197 | const char ReportingHeaderParser::kHeaderOutcomeHistogram[] = |
| 198 | "Net.Reporting.HeaderOutcome"; |
| 199 | |
| 200 | // static |
| 201 | const char ReportingHeaderParser::kHeaderEndpointGroupOutcomeHistogram[] = |
| 202 | "Net.Reporting.HeaderEndpointGroupOutcome"; |
| 203 | |
| 204 | // static |
| 205 | const char ReportingHeaderParser::kHeaderEndpointOutcomeHistogram[] = |
| 206 | "Net.Reporting.HeaderEndpointOutcome"; |
| 207 | |
| 208 | // static |
juliatuttle | 667c0bb | 2017-07-06 15:17:13 | [diff] [blame] | 209 | void ReportingHeaderParser::RecordHeaderDiscardedForNoReportingService() { |
| 210 | RecordHeaderOutcome(HeaderOutcome::DISCARDED_NO_REPORTING_SERVICE); |
| 211 | } |
| 212 | |
| 213 | // static |
| 214 | void ReportingHeaderParser::RecordHeaderDiscardedForInvalidSSLInfo() { |
| 215 | RecordHeaderOutcome(HeaderOutcome::DISCARDED_INVALID_SSL_INFO); |
| 216 | } |
| 217 | |
| 218 | // static |
| 219 | void ReportingHeaderParser::RecordHeaderDiscardedForCertStatusError() { |
| 220 | RecordHeaderOutcome(HeaderOutcome::DISCARDED_CERT_STATUS_ERROR); |
| 221 | } |
| 222 | |
| 223 | // static |
Julia Tuttle | ef19cb5 | 2018-03-16 16:58:35 | [diff] [blame] | 224 | void ReportingHeaderParser::RecordHeaderDiscardedForJsonInvalid() { |
| 225 | RecordHeaderOutcome(HeaderOutcome::DISCARDED_JSON_INVALID); |
| 226 | } |
| 227 | |
| 228 | // static |
| 229 | void ReportingHeaderParser::RecordHeaderDiscardedForJsonTooBig() { |
| 230 | RecordHeaderOutcome(HeaderOutcome::DISCARDED_JSON_TOO_BIG); |
Julia Tuttle | ec467a5f | 2018-02-22 20:22:45 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | // static |
juliatuttle | 58754891 | 2017-05-23 14:17:21 | [diff] [blame] | 234 | void ReportingHeaderParser::ParseHeader(ReportingContext* context, |
| 235 | const GURL& url, |
Julia Tuttle | ec467a5f | 2018-02-22 20:22:45 | [diff] [blame] | 236 | std::unique_ptr<base::Value> value) { |
juliatuttle | 58754891 | 2017-05-23 14:17:21 | [diff] [blame] | 237 | DCHECK(url.SchemeIsCryptographic()); |
| 238 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 239 | const base::ListValue* group_list = nullptr; |
| 240 | bool is_list = value->GetAsList(&group_list); |
juliatuttle | 58754891 | 2017-05-23 14:17:21 | [diff] [blame] | 241 | DCHECK(is_list); |
| 242 | |
| 243 | ReportingDelegate* delegate = context->delegate(); |
| 244 | ReportingCache* cache = context->cache(); |
Julia Tuttle | 443a0a68 | 2017-12-04 16:16:26 | [diff] [blame] | 245 | |
| 246 | url::Origin origin = url::Origin::Create(url); |
| 247 | |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 248 | std::vector<ReportingEndpointGroup> parsed_header; |
Julia Tuttle | 443a0a68 | 2017-12-04 16:16:26 | [diff] [blame] | 249 | |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 250 | for (size_t i = 0; i < group_list->GetSize(); i++) { |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 251 | const base::Value* group_value = nullptr; |
| 252 | bool got_group = group_list->Get(i, &group_value); |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 253 | DCHECK(got_group); |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 254 | ReportingEndpointGroup parsed_endpoint_group; |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 255 | HeaderEndpointGroupOutcome outcome = ProcessEndpointGroup( |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 256 | delegate, cache, origin, *group_value, &parsed_endpoint_group); |
Douglas Creager | f0db63a | 2018-02-28 17:50:23 | [diff] [blame] | 257 | RecordHeaderEndpointGroupOutcome(outcome); |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 258 | if (outcome == HeaderEndpointGroupOutcome::PARSED) |
| 259 | parsed_header.push_back(std::move(parsed_endpoint_group)); |
Julia Tuttle | 443a0a68 | 2017-12-04 16:16:26 | [diff] [blame] | 260 | } |
| 261 | |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 262 | // Remove the client if it has no valid endpoint groups. |
| 263 | if (parsed_header.empty()) { |
| 264 | cache->RemoveClient(origin); |
| 265 | RecordHeaderOutcome(HeaderOutcome::REMOVED_EMPTY); |
| 266 | return; |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 267 | } |
Julia Tuttle | efe2fae4 | 2018-03-30 15:22:31 | [diff] [blame] | 268 | |
Lily Chen | efb6fcf | 2019-04-19 04:17:54 | [diff] [blame] | 269 | cache->OnParsedHeader(origin, std::move(parsed_header)); |
Julia Tuttle | efe2fae4 | 2018-03-30 15:22:31 | [diff] [blame] | 270 | RecordHeaderOutcome(HeaderOutcome::PARSED); |
juliatuttle | 1690bc6 | 2017-03-29 17:16:02 | [diff] [blame] | 271 | } |
| 272 | |
| 273 | } // namespace net |