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

Unified Diff: net/request_throttler/request_throttler_header_adapter.cc

Issue 2487001: Request Throttler : Exponential back-off (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Corrected a flaky test due to having 2 implementation of request throttling Created 10 years, 5 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_adapter.cc
===================================================================
--- net/request_throttler/request_throttler_header_adapter.cc (revision 0)
+++ net/request_throttler/request_throttler_header_adapter.cc (revision 0)
@@ -0,0 +1,21 @@
+// 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.
+
+#include "net/request_throttler/request_throttler_header_adapter.h"
+
+RequestThrottlerHeaderAdapter::RequestThrottlerHeaderAdapter(
+ const scoped_refptr<net::HttpResponseHeaders>& headers)
+ : response_header_(headers) {
+}
+
+std::string RequestThrottlerHeaderAdapter::GetNormalizedValue(
+ const std::string& key) const {
+ std::string return_value;
+ response_header_->GetNormalizedHeader(key, &return_value);
+ return return_value;
+}
+
+int RequestThrottlerHeaderAdapter::GetResponseCode() const {
+ return response_header_->response_code();
+}
« no previous file with comments | « net/request_throttler/request_throttler_header_adapter.h ('k') | net/request_throttler/request_throttler_header_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698