Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: net/request_throttler/request_throttler_header_interface.h

Issue 3005049: This CL will introduce a new way to do exponential back-off on failure within... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/request_throttler/request_throttler_header_interface.h
===================================================================
--- net/request_throttler/request_throttler_header_interface.h (revision 0)
+++ net/request_throttler/request_throttler_header_interface.h (revision 0)
@@ -0,0 +1,24 @@
+// Copyright (c) 2010 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.
+
+#ifndef NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_INTERFACE_H_
+#define NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_INTERFACE_H_
+
+#include <string>
+
+// Interface to an HTTP header to enforce we have the methods we need.
+class RequestThrottlerHeaderInterface {
+ public:
+ virtual ~RequestThrottlerHeaderInterface() {}
+
+ // Method that enables us to fetch the header value by its key.
+ // ex: location: www.example.com -> key = "location" value = "www.example.com"
+ // If the key does not exist, it returns an empty string.
+ virtual std::string GetNormalizedValue(const std::string& key) const = 0;
+
+ // Returns the HTTP response code associated with the request.
+ virtual int GetResponseCode() const = 0;
+};
+
+#endif // NET_REQUEST_THROTTLER_REQUEST_THROTTLER_HEADER_INTERFACE_H_
Property changes on: net\request_throttler\request_throttler_header_interface.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « net/request_throttler/request_throttler_header_adapter.cc ('k') | net/request_throttler/request_throttler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698