OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains an implementation of the ResourceLoaderBridge class. | 5 // This file contains an implementation of the ResourceLoaderBridge class. |
6 // The class is implemented using net::URLRequest, meaning it is a "simple" | 6 // The class is implemented using net::URLRequest, meaning it is a "simple" |
7 // version that directly issues requests. The more complicated one used in the | 7 // version that directly issues requests. The more complicated one used in the |
8 // browser uses IPC. | 8 // browser uses IPC. |
9 // | 9 // |
10 // Because net::URLRequest only provides an asynchronous resource loading API, | 10 // Because net::URLRequest only provides an asynchronous resource loading API, |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 const net::URLRequest& request) const OVERRIDE { | 181 const net::URLRequest& request) const OVERRIDE { |
182 return false; | 182 return false; |
183 } | 183 } |
184 | 184 |
185 virtual int OnBeforeSocketStreamConnect( | 185 virtual int OnBeforeSocketStreamConnect( |
186 net::SocketStream* stream, | 186 net::SocketStream* stream, |
187 const net::CompletionCallback& callback) OVERRIDE { | 187 const net::CompletionCallback& callback) OVERRIDE { |
188 return net::OK; | 188 return net::OK; |
189 } | 189 } |
190 | 190 |
191 virtual void OnCacheWaitStateChange(const net::URLRequest& request, | 191 virtual void OnRequestWaitStateChange(const net::URLRequest& request, |
192 CacheWaitState state) OVERRIDE { | 192 RequestWaitState state) OVERRIDE { |
193 } | 193 } |
194 }; | 194 }; |
195 | 195 |
196 TestShellRequestContextParams* g_request_context_params = NULL; | 196 TestShellRequestContextParams* g_request_context_params = NULL; |
197 TestShellRequestContext* g_request_context = NULL; | 197 TestShellRequestContext* g_request_context = NULL; |
198 TestShellNetworkDelegate* g_network_delegate = NULL; | 198 TestShellNetworkDelegate* g_network_delegate = NULL; |
199 base::Thread* g_cache_thread = NULL; | 199 base::Thread* g_cache_thread = NULL; |
200 | 200 |
201 struct FileOverHTTPParams { | 201 struct FileOverHTTPParams { |
202 FileOverHTTPParams(std::string in_file_path_template, GURL in_http_prefix) | 202 FileOverHTTPParams(std::string in_file_path_template, GURL in_http_prefix) |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https"))); | 1134 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https"))); |
1135 g_file_over_http_params = new FileOverHTTPParams(file_path_template, | 1135 g_file_over_http_params = new FileOverHTTPParams(file_path_template, |
1136 http_prefix); | 1136 http_prefix); |
1137 } | 1137 } |
1138 | 1138 |
1139 // static | 1139 // static |
1140 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create( | 1140 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create( |
1141 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 1141 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
1142 return new ResourceLoaderBridgeImpl(request_info); | 1142 return new ResourceLoaderBridgeImpl(request_info); |
1143 } | 1143 } |
OLD | NEW |