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

Unified Diff: net/url_request/url_request_throttler_header_adapter.cc

Issue 5276007: Implement exponential back-off mechanism. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pull latest to merge Created 10 years, 1 month 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/url_request/url_request_throttler_header_adapter.cc
diff --git a/net/url_request/url_request_throttler_header_adapter.cc b/net/url_request/url_request_throttler_header_adapter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e453071c54eb2f7c2b22cce8f96c645c9ee5fd17
--- /dev/null
+++ b/net/url_request/url_request_throttler_header_adapter.cc
@@ -0,0 +1,27 @@
+// 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/url_request/url_request_throttler_header_adapter.h"
+
+#include "net/http/http_response_headers.h"
+
+namespace net {
+
+URLRequestThrottlerHeaderAdapter::URLRequestThrottlerHeaderAdapter(
+ net::HttpResponseHeaders* headers)
+ : response_header_(headers) {
+}
+
+std::string URLRequestThrottlerHeaderAdapter::GetNormalizedValue(
+ const std::string& key) const {
+ std::string return_value;
+ response_header_->GetNormalizedHeader(key, &return_value);
+ return return_value;
+}
+
+int URLRequestThrottlerHeaderAdapter::GetResponseCode() const {
+ return response_header_->response_code();
+}
+
+} // namespace net
« no previous file with comments | « net/url_request/url_request_throttler_header_adapter.h ('k') | net/url_request/url_request_throttler_header_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698