| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2010 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 NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_ADAPTER_H_ |
| 6 #define NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_ADAPTER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/scoped_ptr.h" |
| 11 #include "net/http/http_response_info.h" |
| 12 #include "net/request_throttler/request_throttler_header_interface.h" |
| 13 |
| 14 // Adapter for the http header interface of the request throttler component. |
| 15 class RequestThrottlerHeaderAdapter : public RequestThrottlerHeaderInterface { |
| 16 public: |
| 17 RequestThrottlerHeaderAdapter( |
| 18 const scoped_refptr<net::HttpResponseHeaders>& headers); |
| 19 virtual ~RequestThrottlerHeaderAdapter() {} |
| 20 |
| 21 // Implementation of the Http header interface |
| 22 virtual std::string GetNormalizedValue(const std::string& key) const; |
| 23 virtual int GetResponseCode() const; |
| 24 private: |
| 25 const scoped_refptr<net::HttpResponseHeaders> response_header_; |
| 26 }; |
| 27 |
| 28 #endif // NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_ADAPTER_H_ |
| OLD | NEW |