| 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_INTERFACE_H_ |
| 6 #define NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_INTERFACE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 // Interface to an HTTP header to enforce we have the methods we need. |
| 11 class RequestThrottlerHeaderInterface { |
| 12 public: |
| 13 virtual ~RequestThrottlerHeaderInterface() {} |
| 14 |
| 15 // Method that enables us to fetch the header value by its key. |
| 16 // ex: location: www.example.com -> key = "location" value = "www.example.com" |
| 17 // If the key does not exist, it returns an empty string. |
| 18 virtual std::string GetNormalizedValue(const std::string& key) const = 0; |
| 19 |
| 20 // Returns the HTTP response code associated with the request. |
| 21 virtual int GetResponseCode() const = 0; |
| 22 }; |
| 23 |
| 24 #endif // NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_INTERFACE_H_ |
| OLD | NEW |