OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_TOOLS_TEST_SHELL_SIMPLE_RESOURCE_LOADER_BRIDGE_H__ | 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_SIMPLE_RESOURCE_LOADER_BRIDGE_H__ |
6 #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_RESOURCE_LOADER_BRIDGE_H__ | 6 #define WEBKIT_TOOLS_TEST_SHELL_SIMPLE_RESOURCE_LOADER_BRIDGE_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "net/http/http_cache.h" | 10 #include "net/http/http_cache.h" |
11 | 11 |
12 class FilePath; | 12 class FilePath; |
13 class GURL; | 13 class GURL; |
14 class TestShellRequestContext; | |
15 | 14 |
16 class SimpleResourceLoaderBridge { | 15 class SimpleResourceLoaderBridge { |
17 public: | 16 public: |
18 // Call this function to initialize the simple resource loader bridge. | 17 // Call this function to initialize the simple resource loader bridge. |
19 // It is safe to call this function multiple times. | 18 // It is safe to call this function multiple times. |
20 // | 19 // |
21 // NOTE: If this function is not called, then a default request context will | 20 // NOTE: If this function is not called, then a default request context will |
22 // be initialized lazily. | 21 // be initialized lazily. |
23 // | 22 // |
24 static void Init(const FilePath& cache_path, | 23 static void Init(const FilePath& cache_path, |
(...skipping 23 matching lines...) Expand all Loading... |
48 // If yes, when the request url uses file scheme and matches sub string | 47 // If yes, when the request url uses file scheme and matches sub string |
49 // |file_path_template|, SimpleResourceLoaderBridge will use |http_prefix| | 48 // |file_path_template|, SimpleResourceLoaderBridge will use |http_prefix| |
50 // plus string of after |file_path_template| in original request URl to | 49 // plus string of after |file_path_template| in original request URl to |
51 // generate a new http URL to get the data and send back to peer. | 50 // generate a new http URL to get the data and send back to peer. |
52 // That is how we implement file-over-http feature. | 51 // That is how we implement file-over-http feature. |
53 static void AllowFileOverHTTP(const std::string& file_path_template, | 52 static void AllowFileOverHTTP(const std::string& file_path_template, |
54 const GURL& http_prefix); | 53 const GURL& http_prefix); |
55 }; | 54 }; |
56 | 55 |
57 #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_RESOURCE_LOADER_BRIDGE_H__ | 56 #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_RESOURCE_LOADER_BRIDGE_H__ |
OLD | NEW |