summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/buffered_resource_handler.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-20 01:47:48 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-20 01:47:48 +0000
commit932b32a15a691e04aa325a8b23810b81d18f1b75 (patch)
treee5269b0991db0367eda258f438a44ce3d0aa5689 /chrome/browser/renderer_host/buffered_resource_handler.h
parent341e6e82f9e8619b78b08a7ea0b4d7e396738143 (diff)
downloadchromium_src-932b32a15a691e04aa325a8b23810b81d18f1b75.zip
chromium_src-932b32a15a691e04aa325a8b23810b81d18f1b75.tar.gz
chromium_src-932b32a15a691e04aa325a8b23810b81d18f1b75.tar.bz2
Reverting my CL to fix build bustage.
TBR=maruel Review URL: http://codereview.chromium.org/15099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/buffered_resource_handler.h')
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.h b/chrome/browser/renderer_host/buffered_resource_handler.h
deleted file mode 100644
index 0b832a9..0000000
--- a/chrome/browser/renderer_host/buffered_resource_handler.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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.
-
-#ifndef CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_
-#define CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_
-
-#include <string>
-
-#include "chrome/browser/renderer_host/resource_handler.h"
-
-class ResourceDispatcherHost;
-
-// Used to buffer a request until enough data has been received.
-class BufferedResourceHandler : public ResourceHandler {
- public:
- BufferedResourceHandler(ResourceHandler* handler,
- ResourceDispatcherHost* host,
- URLRequest* request);
-
- // ResourceHandler implementation:
- bool OnUploadProgress(int request_id, uint64 position, uint64 size);
- bool OnRequestRedirected(int request_id, const GURL& new_url);
- bool OnResponseStarted(int request_id, ResourceResponse* response);
- bool OnWillRead(int request_id, char** buf, int* buf_size, int min_size);
- bool OnReadCompleted(int request_id, int* bytes_read);
- bool OnResponseCompleted(int request_id, const URLRequestStatus& status);
-
- private:
- // Returns true if we should delay OnResponseStarted forwarding.
- bool DelayResponse();
-
- // Returns true if there will be a need to parse the DocType of the document
- // to determine the right way to handle it.
- bool ShouldBuffer(const GURL& url, const std::string& mime_type);
-
- // Returns true if there is enough information to process the DocType.
- bool DidBufferEnough(int bytes_read);
-
- // Returns true if we have to keep buffering data.
- bool KeepBuffering(int bytes_read);
-
- // Sends a pending OnResponseStarted notification. |in_complete| is true if
- // this is invoked from |OnResponseCompleted|.
- bool CompleteResponseStarted(int request_id, bool in_complete);
-
- scoped_refptr<ResourceHandler> real_handler_;
- scoped_refptr<ResourceResponse> response_;
- ResourceDispatcherHost* host_;
- URLRequest* request_;
- char* read_buffer_;
- int read_buffer_size_;
- int bytes_read_;
- bool sniff_content_;
- bool should_buffer_;
- bool buffering_;
- bool finished_;
-
- DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler);
-};
-
-#endif // CHROME_BROWSER_RENDERER_HOST_BUFFERED_RESOURCE_HANDLER_H_