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
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_H_
6 #define IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ios/web/public/test/response_providers/file_based_response_provider_impl.h"
11 #include "ios/web/public/test/response_providers/response_provider.h"
19 // FileBasedResponseProvider tries to resolve URL as if it were a path relative
20 // to |path| on the filesystem.
21 class FileBasedResponseProvider
: public ResponseProvider
{
23 explicit FileBasedResponseProvider(const base::FilePath
& path
);
24 ~FileBasedResponseProvider() override
;
26 // web::ReponseProvider implementation.
27 bool CanHandleRequest(const Request
& request
) override
;
28 GCDWebServerResponse
* GetGCDWebServerResponse(
29 const Request
& request
) override
;
32 scoped_ptr
<FileBasedResponseProviderImpl
> response_provider_impl_
;
36 #endif // IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_H_