Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: ios/web/public/test/response_providers/file_based_response_provider_impl.h

Issue 2898733003: Split up ios/web:test_support. (Closed)
Patch Set: don't break downstream clients Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_IMPL _H_
6 #define IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_IMPL _H_
7
8 #include "base/files/file_path.h"
9 #import "ios/web/public/test/response_providers/response_provider.h"
10
11 class GURL;
12
13 namespace web {
14
15 // FileBasedMockResponseProvider tries to resolve URL as if it were a path
16 // relative to |path| on the filesystem. Use |BuildTargetPath| to resolve URLs
17 // to paths on the filesystem.
18 class FileBasedResponseProviderImpl {
19 public:
20 explicit FileBasedResponseProviderImpl(const base::FilePath& path);
21 virtual ~FileBasedResponseProviderImpl();
22
23 // Returns true if the request's URL when converted to a path on the app
24 // bundle has a file present.
25 bool CanHandleRequest(const ResponseProvider::Request& request);
26 // Converts |url| to a path on the app bundle. Used to resolve URLs on to the
27 // app bundle.
28 base::FilePath BuildTargetPath(const GURL& url);
29
30 private:
31 // The path according to which URLs are resolved from.
32 base::FilePath path_;
33 };
34 }
35
36 #endif // IOS_WEB_PUBLIC_TEST_RESPONSE_PROVIDERS_FILE_BASED_RESPONSE_PROVIDER_I MPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698