diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 22:20:39 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-11 22:20:39 +0000 |
commit | b2787cf4c95b5e22162a345140a9350bcd5b675e (patch) | |
tree | a2cb733808ccec4cab58919c120b1f0be9dde53d /webkit/glue/weburlloader_impl.h | |
parent | 23bd81e08bf59f02ad164caa42ea1b18807c2420 (diff) | |
download | chromium_src-b2787cf4c95b5e22162a345140a9350bcd5b675e.zip chromium_src-b2787cf4c95b5e22162a345140a9350bcd5b675e.tar.gz chromium_src-b2787cf4c95b5e22162a345140a9350bcd5b675e.tar.bz2 |
Fix javascript-backslash.html layout test failure.
The fix is to break WebURLLoaderImpl into two classes. It now has a
reference counted inner class that is the ResourceLoaderBridge::Peer.
This change allows the inner class to stick around after the loader
has been destroyed. That is necessary since the Peer expects to still
receive OnCompletedRequest after it calls Cancel on the bridge.
R=dglazkov
TEST=covered by layout test
BUG=13786
Review URL: http://codereview.chromium.org/125002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/weburlloader_impl.h')
-rw-r--r-- | webkit/glue/weburlloader_impl.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/webkit/glue/weburlloader_impl.h b/webkit/glue/weburlloader_impl.h index 2ad50c3..9199c74 100644 --- a/webkit/glue/weburlloader_impl.h +++ b/webkit/glue/weburlloader_impl.h @@ -5,16 +5,12 @@ #ifndef WEBKIT_GLUE_WEBURLLOADER_IMPL_H_ #define WEBKIT_GLUE_WEBURLLOADER_IMPL_H_ -#include "base/scoped_ptr.h" -#include "base/task.h" +#include "base/ref_counted.h" #include "webkit/api/public/WebURLLoader.h" -#include "webkit/glue/multipart_response_delegate.h" -#include "webkit/glue/resource_loader_bridge.h" namespace webkit_glue { -class WebURLLoaderImpl : public WebKit::WebURLLoader, - public ResourceLoaderBridge::Peer { +class WebURLLoaderImpl : public WebKit::WebURLLoader { public: WebURLLoaderImpl(); ~WebURLLoaderImpl(); @@ -31,29 +27,9 @@ class WebURLLoaderImpl : public WebKit::WebURLLoader, virtual void cancel(); virtual void setDefersLoading(bool value); - // ResourceLoaderBridge::Peer methods: - virtual void OnUploadProgress(uint64 position, uint64 size); - virtual void OnReceivedRedirect(const GURL& new_url); - virtual void OnReceivedResponse( - const ResourceLoaderBridge::ResponseInfo& info, bool content_filtered); - virtual void OnReceivedData(const char* data, int len); - virtual void OnCompletedRequest( - const URLRequestStatus& status, const std::string& security_info); - virtual std::string GetURLForDebugging(); - private: - void Start( - const WebKit::WebURLRequest& request, - ResourceLoaderBridge::SyncLoadResponse* sync_load_response); - void HandleDataURL(); - - ScopedRunnableMethodFactory<WebURLLoaderImpl> task_factory_; - - GURL url_; - WebKit::WebURLLoaderClient* client_; - scoped_ptr<ResourceLoaderBridge> bridge_; - scoped_ptr<MultipartResponseDelegate> multipart_delegate_; - int64 expected_content_length_; + class Context; + scoped_refptr<Context> context_; }; } // namespace webkit_glue |