| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #import "ios/web/public/test/response_providers/string_response_provider.h" | 5 #import "ios/web/public/test/http_server/string_response_provider.h" |
| 6 | 6 |
| 7 namespace web { | 7 namespace web { |
| 8 | 8 |
| 9 StringResponseProvider::StringResponseProvider(const std::string& response_body) | 9 StringResponseProvider::StringResponseProvider(const std::string& response_body) |
| 10 : response_body_(response_body) {} | 10 : response_body_(response_body) {} |
| 11 | 11 |
| 12 bool StringResponseProvider::CanHandleRequest(const Request& request) { | 12 bool StringResponseProvider::CanHandleRequest(const Request& request) { |
| 13 return true; | 13 return true; |
| 14 } | 14 } |
| 15 | 15 |
| 16 void StringResponseProvider::GetResponseHeadersAndBody( | 16 void StringResponseProvider::GetResponseHeadersAndBody( |
| 17 const Request& request, | 17 const Request& request, |
| 18 scoped_refptr<net::HttpResponseHeaders>* headers, | 18 scoped_refptr<net::HttpResponseHeaders>* headers, |
| 19 std::string* response_body) { | 19 std::string* response_body) { |
| 20 *headers = GetDefaultResponseHeaders(); | 20 *headers = GetDefaultResponseHeaders(); |
| 21 *response_body = response_body_; | 21 *response_body = response_body_; |
| 22 } | 22 } |
| 23 | 23 |
| 24 } // namespace web | 24 } // namespace web |
| OLD | NEW |