| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_HTML_RESPONSE_PROVIDER_H_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_HTTP_SERVER_HTML_RESPONSE_PROVIDER_H_ | 
| 6 #define IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_HTML_RESPONSE_PROVIDER_H_ | 6 #define IOS_WEB_PUBLIC_TEST_HTTP_SERVER_HTML_RESPONSE_PROVIDER_H_ | 
| 7 | 7 | 
| 8 #include <map> | 8 #include <map> | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" | 
| 12 #import "ios/web/public/test/response_providers/data_response_provider.h" | 12 #import "ios/web/public/test/http_server/data_response_provider.h" | 
| 13 #import "ios/web/public/test/response_providers/html_response_provider_impl.h" | 13 #import "ios/web/public/test/http_server/html_response_provider_impl.h" | 
| 14 #import "ios/web/public/test/response_providers/response_provider.h" | 14 #import "ios/web/public/test/http_server/response_provider.h" | 
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" | 
| 16 | 16 | 
| 17 namespace net { | 17 namespace net { | 
| 18 class HttpResponseHeaders; | 18 class HttpResponseHeaders; | 
| 19 } | 19 } | 
| 20 | 20 | 
| 21 // A web::DataResponseProvider that maps URLs to requests. | 21 // A web::DataResponseProvider that maps URLs to requests. | 
| 22 class HtmlResponseProvider : public web::DataResponseProvider { | 22 class HtmlResponseProvider : public web::DataResponseProvider { | 
| 23  public: | 23  public: | 
| 24   // Constructs an HtmlResponseProvider that does not respond to any request. | 24   // Constructs an HtmlResponseProvider that does not respond to any request. | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 43   // web::DataResponseProvider implementation. | 43   // web::DataResponseProvider implementation. | 
| 44   void GetResponseHeadersAndBody( | 44   void GetResponseHeadersAndBody( | 
| 45       const Request& request, | 45       const Request& request, | 
| 46       scoped_refptr<net::HttpResponseHeaders>* headers, | 46       scoped_refptr<net::HttpResponseHeaders>* headers, | 
| 47       std::string* response_body) override; | 47       std::string* response_body) override; | 
| 48 | 48 | 
| 49  private: | 49  private: | 
| 50   std::unique_ptr<HtmlResponseProviderImpl> response_provider_impl_; | 50   std::unique_ptr<HtmlResponseProviderImpl> response_provider_impl_; | 
| 51 }; | 51 }; | 
| 52 | 52 | 
| 53 #endif  // IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_HTML_RESPONSE_PROVIDER_H_ | 53 #endif  // IOS_WEB_PUBLIC_TEST_HTTP_SERVER_HTML_RESPONSE_PROVIDER_H_ | 
| OLD | NEW | 
|---|