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

Unified Diff: webkit/tools/test_shell/test_shell_request_context.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/tools/test_shell/simple_resource_loader_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_request_context.cc
diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc
index 43914c95c32c4aa2ecf2d77d86518525be1aede6..c21f3220058192b428f987124885757027c23010 100644
--- a/webkit/tools/test_shell/test_shell_request_context.cc
+++ b/webkit/tools/test_shell/test_shell_request_context.cc
@@ -17,10 +17,13 @@
#include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_config_service_fixed.h"
#include "net/proxy/proxy_service.h"
+#include "net/url_request/url_request_job_factory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h"
#include "webkit/blob/blob_storage_controller.h"
+#include "webkit/blob/blob_url_request_job_factory.h"
#include "webkit/fileapi/file_system_context.h"
+#include "webkit/fileapi/file_system_url_request_job_factory.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/tools/test_shell/simple_file_system.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
@@ -95,6 +98,19 @@ void TestShellRequestContext::Init(
blob_storage_controller_.reset(new webkit_blob::BlobStorageController());
file_system_context_ = static_cast<SimpleFileSystem*>(
WebKit::webKitClient()->fileSystem())->file_system_context();
+
+ net::URLRequestJobFactory* job_factory = new net::URLRequestJobFactory;
+ job_factory->SetProtocolHandler(
+ "blob",
+ new webkit_blob::BlobProtocolHandler(
+ blob_storage_controller_.get(),
+ SimpleResourceLoaderBridge::GetIoThread()));
+ job_factory->SetProtocolHandler(
+ "filesystem",
+ fileapi::CreateFileSystemProtocolHandler(
+ file_system_context_.get(),
+ SimpleResourceLoaderBridge::GetIoThread()));
+ storage_.set_job_factory(job_factory);
}
TestShellRequestContext::~TestShellRequestContext() {
« no previous file with comments | « webkit/tools/test_shell/simple_resource_loader_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698