| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/url_request/url_request_throttler_test_support.h" | 5 #include "net/url_request/url_request_throttler_test_support.h" |
| 6 | 6 |
| 7 #include "net/url_request/url_request_throttler_entry.h" | 7 #include "net/url_request/url_request_throttler_entry.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 std::string MockURLRequestThrottlerHeaderAdapter::GetNormalizedValue( | 43 std::string MockURLRequestThrottlerHeaderAdapter::GetNormalizedValue( |
| 44 const std::string& key) const { | 44 const std::string& key) const { |
| 45 if (key == | 45 if (key == |
| 46 URLRequestThrottlerEntry::kExponentialThrottlingHeader && | 46 URLRequestThrottlerEntry::kExponentialThrottlingHeader && |
| 47 !fake_opt_out_value_.empty()) { | 47 !fake_opt_out_value_.empty()) { |
| 48 return fake_opt_out_value_; | 48 return fake_opt_out_value_; |
| 49 } | 49 } |
| 50 | 50 |
| 51 return ""; | 51 return std::string(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 int MockURLRequestThrottlerHeaderAdapter::GetResponseCode() const { | 54 int MockURLRequestThrottlerHeaderAdapter::GetResponseCode() const { |
| 55 return fake_response_code_; | 55 return fake_response_code_; |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace net | 58 } // namespace net |
| OLD | NEW |