OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RESPONSE_PROVIDER_H_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_RESPONSE_PROVIDER_H_ |
6 #define IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_RESPONSE_PROVIDER_H_ | 6 #define IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_RESPONSE_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 virtual bool CanHandleRequest(const Request& request) = 0; | 46 virtual bool CanHandleRequest(const Request& request) = 0; |
47 | 47 |
48 // Returns the GCDWebServerResponse as a reply to the request. Will only be | 48 // Returns the GCDWebServerResponse as a reply to the request. Will only be |
49 // called if the provider can handle the request. | 49 // called if the provider can handle the request. |
50 virtual GCDWebServerResponse* GetGCDWebServerResponse( | 50 virtual GCDWebServerResponse* GetGCDWebServerResponse( |
51 const Request& request) = 0; | 51 const Request& request) = 0; |
52 | 52 |
53 // Gets default response headers with a text/html content type and a 200 | 53 // Gets default response headers with a text/html content type and a 200 |
54 // response code. | 54 // response code. |
55 static scoped_refptr<net::HttpResponseHeaders> GetDefaultResponseHeaders(); | 55 static scoped_refptr<net::HttpResponseHeaders> GetDefaultResponseHeaders(); |
56 // Gets default response headers with a text/html content type and a 200 | |
57 // response code. | |
pkl (ping after 24h if needed)
2016/08/30 21:24:04
This comment does not match what this method actua
liaoyuke
2016/09/12 18:58:13
Acknowledged.
| |
58 static scoped_refptr<net::HttpResponseHeaders> GetDefaultResponseHeaders( | |
59 const std::string& cookie); | |
56 // Gets configurable response headers with a provided content type and a | 60 // Gets configurable response headers with a provided content type and a |
57 // 200 response code. | 61 // 200 response code. |
58 static scoped_refptr<net::HttpResponseHeaders> GetResponseHeaders( | 62 static scoped_refptr<net::HttpResponseHeaders> GetResponseHeaders( |
59 const std::string& content_type); | 63 const std::string& content_type); |
60 // Gets configurable response headers with a provided content type and | 64 // Gets configurable response headers with a provided content type and |
61 // response code. | 65 // response code. |
62 static scoped_refptr<net::HttpResponseHeaders> GetResponseHeaders( | 66 static scoped_refptr<net::HttpResponseHeaders> GetResponseHeaders( |
63 const std::string& content_type, | 67 const std::string& content_type, |
64 net::HttpStatusCode response_code); | 68 net::HttpStatusCode response_code); |
65 // Gets configurable response based on |http_status| headers for redirecting | 69 // Gets configurable response based on |http_status| headers for redirecting |
66 // to |destination|. | 70 // to |destination|. |
67 static scoped_refptr<net::HttpResponseHeaders> GetRedirectResponseHeaders( | 71 static scoped_refptr<net::HttpResponseHeaders> GetRedirectResponseHeaders( |
68 const std::string& destination, | 72 const std::string& destination, |
69 const net::HttpStatusCode& http_status); | 73 const net::HttpStatusCode& http_status); |
70 | 74 |
71 ResponseProvider(); | 75 ResponseProvider(); |
72 virtual ~ResponseProvider() {}; | 76 virtual ~ResponseProvider() {}; |
73 private: | 77 private: |
74 DISALLOW_COPY_AND_ASSIGN(ResponseProvider); | 78 DISALLOW_COPY_AND_ASSIGN(ResponseProvider); |
75 }; | 79 }; |
76 | 80 |
77 } // namspace web | 81 } // namspace web |
78 | 82 |
79 #endif // IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_RESPONSE_PROVIDER_H_ | 83 #endif // IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_RESPONSE_PROVIDER_H_ |
OLD | NEW |