summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_throttler_header_adapter.cc
blob: 51bbc746fac4881eee0950e68268e856cf9ed6de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2011 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.

#include "net/url_request/url_request_throttler_header_adapter.h"

#include "net/http/http_response_headers.h"

namespace net {

URLRequestThrottlerHeaderAdapter::URLRequestThrottlerHeaderAdapter(
    HttpResponseHeaders* headers)
    : response_header_(headers) {
}

URLRequestThrottlerHeaderAdapter::~URLRequestThrottlerHeaderAdapter() {}

std::string URLRequestThrottlerHeaderAdapter::GetNormalizedValue(
    const std::string& key) const {
  std::string return_value;
  response_header_->GetNormalizedHeader(key, &return_value);
  return return_value;
}

int URLRequestThrottlerHeaderAdapter::GetResponseCode() const {
  return response_header_->response_code();
}

}  // namespace net