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 #ifndef IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_H_ | 5 #ifndef IOS_WEB_PUBLIC_TEST_HTTP_SERVER_FILE_BASED_RESPONSE_PROVIDER_H_ |
6 #define IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_H_ | 6 #define IOS_WEB_PUBLIC_TEST_HTTP_SERVER_FILE_BASED_RESPONSE_PROVIDER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #import "ios/web/public/test/response_providers/file_based_response_provider_imp
l.h" | 11 #import "ios/web/public/test/http_server/file_based_response_provider_impl.h" |
12 #import "ios/web/public/test/response_providers/response_provider.h" | 12 #import "ios/web/public/test/http_server/response_provider.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class FilePath; | 15 class FilePath; |
16 } | 16 } |
17 | 17 |
18 namespace web { | 18 namespace web { |
19 | 19 |
20 // FileBasedResponseProvider tries to resolve URL as if it were a path relative | 20 // FileBasedResponseProvider tries to resolve URL as if it were a path relative |
21 // to |path| on the filesystem. | 21 // to |path| on the filesystem. |
22 class FileBasedResponseProvider : public ResponseProvider { | 22 class FileBasedResponseProvider : public ResponseProvider { |
23 public: | 23 public: |
24 explicit FileBasedResponseProvider(const base::FilePath& path); | 24 explicit FileBasedResponseProvider(const base::FilePath& path); |
25 ~FileBasedResponseProvider() override; | 25 ~FileBasedResponseProvider() override; |
26 | 26 |
27 // web::ReponseProvider implementation. | 27 // web::ReponseProvider implementation. |
28 bool CanHandleRequest(const Request& request) override; | 28 bool CanHandleRequest(const Request& request) override; |
29 GCDWebServerResponse* GetGCDWebServerResponse( | 29 GCDWebServerResponse* GetGCDWebServerResponse( |
30 const Request& request) override; | 30 const Request& request) override; |
31 | 31 |
32 private: | 32 private: |
33 std::unique_ptr<FileBasedResponseProviderImpl> response_provider_impl_; | 33 std::unique_ptr<FileBasedResponseProviderImpl> response_provider_impl_; |
34 }; | 34 }; |
35 } | 35 } |
36 | 36 |
37 #endif // IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_H
_ | 37 #endif // IOS_WEB_PUBLIC_TEST_HTTP_SERVER_FILE_BASED_RESPONSE_PROVIDER_H_ |
OLD | NEW |