Update component_updater to use the new version of LaunchProcess.
[chromium-blink-merge.git] / net / url_request / url_request_throttler_header_adapter.h
blobe5fbcd2fd9789321c65a844cebd07df29f879e31
1 // Copyright (c) 2011 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.
5 #ifndef NET_URL_REQUEST_URL_REQUEST_THROTTLER_HEADER_ADAPTER_H_
6 #define NET_URL_REQUEST_URL_REQUEST_THROTTLER_HEADER_ADAPTER_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "net/url_request/url_request_throttler_header_interface.h"
14 namespace net {
16 class HttpResponseHeaders;
18 // Adapter for the HTTP header interface of the URL request throttler component.
19 class URLRequestThrottlerHeaderAdapter
20 : public URLRequestThrottlerHeaderInterface {
21 public:
22 explicit URLRequestThrottlerHeaderAdapter(HttpResponseHeaders* headers);
23 ~URLRequestThrottlerHeaderAdapter() override;
25 // Implementation of URLRequestThrottlerHeaderInterface
26 std::string GetNormalizedValue(const std::string& key) const override;
27 int GetResponseCode() const override;
29 private:
30 const scoped_refptr<HttpResponseHeaders> response_header_;
33 } // namespace net
35 #endif // NET_URL_REQUEST_URL_REQUEST_THROTTLER_HEADER_ADAPTER_H_