diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 00:46:33 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 00:46:33 +0000 |
commit | 46b0d4aacbf25108badc143e09f91064fc0b0472 (patch) | |
tree | d1ec74ba60c5c7ae6fd683ad7b685095434e6f03 /webkit/tools | |
parent | 08ae5f310a475f73807df520fa0b50cf7138c4f5 (diff) | |
download | chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.zip chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.tar.gz chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.tar.bz2 |
Add a CreateBridge method to the ChildThread.
The intent is to allow unit-tests that use render view
to override ChildThread::CreateBridge() to provide their
own resource loading.
This is used by the upcoming translate unit-test.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/503032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/simple_resource_loader_bridge.cc | 45 |
1 files changed, 13 insertions, 32 deletions
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc index 512802a..2c0c124b 100644 --- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc +++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc @@ -483,24 +483,18 @@ class SyncRequestProxy : public RequestProxy { class ResourceLoaderBridgeImpl : public ResourceLoaderBridge { public: - ResourceLoaderBridgeImpl(const std::string& method, - const GURL& url, - const GURL& first_party_for_cookies, - const GURL& referrer, - const std::string& headers, - int load_flags, - ResourceType::Type request_type, - int appcache_host_id) + ResourceLoaderBridgeImpl( + const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) : params_(new RequestParams), proxy_(NULL) { - params_->method = method; - params_->url = url; - params_->first_party_for_cookies = first_party_for_cookies; - params_->referrer = referrer; - params_->headers = headers; - params_->load_flags = load_flags; - params_->request_type = request_type; - params_->appcache_host_id = appcache_host_id; + params_->method = request_info.method; + params_->url = request_info.url; + params_->first_party_for_cookies = request_info.first_party_for_cookies; + params_->referrer = request_info.referrer; + params_->headers = request_info.headers; + params_->load_flags = request_info.load_flags; + params_->request_type = request_info.request_type; + params_->appcache_host_id = request_info.appcache_host_id; } virtual ~ResourceLoaderBridgeImpl() { @@ -631,23 +625,10 @@ class CookieGetter : public base::RefCountedThreadSafe<CookieGetter> { namespace webkit_glue { -// factory function +// Factory function. ResourceLoaderBridge* ResourceLoaderBridge::Create( - const std::string& method, - const GURL& url, - const GURL& first_party_for_cookies, - const GURL& referrer, - const std::string& frame_origin, - const std::string& main_frame_origin, - const std::string& headers, - int load_flags, - int requestor_pid, - ResourceType::Type request_type, - int appcache_host_id, - int routing_id) { - return new ResourceLoaderBridgeImpl(method, url, first_party_for_cookies, - referrer, headers, load_flags, - request_type, appcache_host_id); + const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { + return new ResourceLoaderBridgeImpl(request_info); } // Issue the proxy resolve request on the io thread, and wait |