summaryrefslogtreecommitdiffstats
path: root/webkit/glue/multipart_response_delegate.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-30 22:42:58 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-30 22:42:58 +0000
commiteed529ce5d09706bc2b9da5b96822eda2919a9ae (patch)
treef5afad43a1e8412ed9473fa9d7e418621373decd /webkit/glue/multipart_response_delegate.h
parentee8f54a54cab5cc3eaf837622ec61b482fac8858 (diff)
downloadchromium_src-eed529ce5d09706bc2b9da5b96822eda2919a9ae.zip
chromium_src-eed529ce5d09706bc2b9da5b96822eda2919a9ae.tar.gz
chromium_src-eed529ce5d09706bc2b9da5b96822eda2919a9ae.tar.bz2
Revert WebURLLoader landing. Too many layout test failures.
TBR=dglazkov Review URL: http://codereview.chromium.org/115973 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17293 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/multipart_response_delegate.h')
-rw-r--r--webkit/glue/multipart_response_delegate.h57
1 files changed, 26 insertions, 31 deletions
diff --git a/webkit/glue/multipart_response_delegate.h b/webkit/glue/multipart_response_delegate.h
index 3676a78..41d09c2 100644
--- a/webkit/glue/multipart_response_delegate.h
+++ b/webkit/glue/multipart_response_delegate.h
@@ -1,10 +1,11 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// A delegate class of WebURLLoaderImpl that handles multipart/x-mixed-replace
-// data. We special case multipart/x-mixed-replace because WebCore expects a
-// separate didReceiveResponse for each new message part.
+// A delegate class of ResourceHandleInternal (resource_handle_win) that
+// handles multipart/x-mixed-replace data. We special case
+// multipart/x-mixed-replace because WebCore expects a separate
+// didReceiveResponse for each new message part.
//
// Most of the logic and edge case handling are based on the Mozilla's
// implementation in netwerk/streamconv/converters/nsMultiMixedConv.cpp.
@@ -46,28 +47,28 @@
*
* ***** END LICENSE BLOCK ***** */
-#ifndef WEBKIT_GLUE_MULTIPART_RESPONSE_DELEGATE_H_
-#define WEBKIT_GLUE_MULTIPART_RESPONSE_DELEGATE_H_
-
#include <string>
-#include "webkit/api/public/WebURLResponse.h"
+#include "config.h"
-namespace WebKit {
-class WebURLLoader;
-class WebURLLoaderClient;
-}
+#include "base/compiler_specific.h"
-namespace webkit_glue {
+MSVC_PUSH_WARNING_LEVEL(0);
+#include "ResourceResponse.h"
+MSVC_POP_WARNING();
-// Used by unit tests to access private members.
-class MultipartResponseDelegateTester;
+namespace WebCore {
+ class ResourceHandle;
+ class ResourceHandleClient;
+}
class MultipartResponseDelegate {
+ friend class MultipartResponseTest_Functions_Test; // For unittests.
+
public:
- MultipartResponseDelegate(WebKit::WebURLLoaderClient* client,
- WebKit::WebURLLoader* loader,
- const WebKit::WebURLResponse& response,
+ MultipartResponseDelegate(WebCore::ResourceHandleClient* client,
+ WebCore::ResourceHandle* job,
+ const WebCore::ResourceResponse& response,
const std::string& boundary);
// Passed through from ResourceHandleInternal
@@ -77,27 +78,25 @@ class MultipartResponseDelegate {
// Returns the multi part boundary string from the Content-type header
// in the response.
// Returns true on success.
- static bool ReadMultipartBoundary(const WebKit::WebURLResponse& response,
+ static bool ReadMultipartBoundary(const WebCore::ResourceResponse& response,
std::string* multipart_boundary);
// Returns the lower and higher content ranges from an individual multipart
// in a multipart response.
// Returns true on success.
- static bool ReadContentRanges(const WebKit::WebURLResponse& response,
+ static bool ReadContentRanges(const WebCore::ResourceResponse& response,
int* content_range_lower_bound,
int* content_range_upper_bound);
private:
- friend class MultipartResponseDelegateTester; // For unittests.
-
- // Pointers to the client and associated loader so we can make callbacks as
- // we parse pieces of data.
- WebKit::WebURLLoaderClient* client_;
- WebKit::WebURLLoader* loader_;
+ // Pointers back to our owning object so we can make callbacks as we parse
+ // pieces of data.
+ WebCore::ResourceHandleClient* client_;
+ WebCore::ResourceHandle* job_;
// The original resource response for this request. We use this as a
// starting point for each parts response.
- WebKit::WebURLResponse original_response_;
+ WebCore::ResourceResponse original_response_;
// Checks to see if data[pos] character is a line break; handles crlf, lflf,
// lf, or cr. Returns the number of characters to skip over (0, 1 or 2).
@@ -129,7 +128,3 @@ class MultipartResponseDelegate {
// processing AddData requests.
bool stop_sending_;
};
-
-} // namespace webkit_glue
-
-#endif