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

Unified Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 7036004: Remove more URLRequest::RegisterProtocolFactory calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup nits. Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/webkit_fileapi.gypi ('k') | webkit/tools/test_shell/test_shell_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/simple_resource_loader_bridge.cc
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 5f4cd4d796c7b6bc6f73368d060077da4e4c7748..a5591afe0292f8504d9a62a169f48c9f170246c8 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -96,44 +96,6 @@ struct TestShellRequestContextParams {
bool no_proxy;
};
-net::URLRequestJob* BlobURLRequestJobFactory(net::URLRequest* request,
- const std::string& scheme) {
- webkit_blob::BlobStorageController* blob_storage_controller =
- static_cast<TestShellRequestContext*>(request->context())->
- blob_storage_controller();
- return new webkit_blob::BlobURLRequestJob(
- request,
- blob_storage_controller->GetBlobDataFromUrl(request->url()),
- SimpleResourceLoaderBridge::GetIoThread());
-}
-
-
-net::URLRequestJob* FileSystemURLRequestJobFactory(net::URLRequest* request,
- const std::string& scheme) {
- fileapi::FileSystemContext* fs_context =
- static_cast<TestShellRequestContext*>(request->context())
- ->file_system_context();
- if (!fs_context) {
- LOG(WARNING) << "No FileSystemContext found, ignoring filesystem: URL";
- return NULL;
- }
-
- // If the path ends with a /, we know it's a directory. If the path refers
- // to a directory and gets dispatched to FileSystemURLRequestJob, that class
- // redirects back here, by adding a / to the URL.
- const std::string path = request->url().path();
- if (!path.empty() && path[path.size() - 1] == '/') {
- return new fileapi::FileSystemDirURLRequestJob(
- request,
- fs_context,
- SimpleResourceLoaderBridge::GetIoThread());
- }
- return new fileapi::FileSystemURLRequestJob(
- request,
- fs_context,
- SimpleResourceLoaderBridge::GetIoThread());
-}
-
TestShellRequestContextParams* g_request_context_params = NULL;
TestShellRequestContext* g_request_context = NULL;
base::Thread* g_cache_thread = NULL;
@@ -171,10 +133,6 @@ class IOThread : public base::Thread {
SimpleFileWriter::InitializeOnIOThread(g_request_context);
TestShellWebBlobRegistryImpl::InitializeOnIOThread(
g_request_context->blob_storage_controller());
-
- net::URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory);
- net::URLRequest::RegisterProtocolFactory("filesystem",
- &FileSystemURLRequestJobFactory);
}
virtual void CleanUp() {
« no previous file with comments | « webkit/fileapi/webkit_fileapi.gypi ('k') | webkit/tools/test_shell/test_shell_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698