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

Unified Diff: content/browser/loader/stream_resource_handler.h

Issue 625993002: Split up streams logic to prepare for PlzNavigate RDH changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: zork comments Created 6 years, 2 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
Index: content/browser/loader/stream_resource_handler.h
diff --git a/content/browser/loader/stream_resource_handler.h b/content/browser/loader/stream_resource_handler.h
index a850d7ab9249b73bab6d55046cf73f6f96eb888f..cdce727a9dfd2748b25ab2cbfbd97cfae583723e 100644
--- a/content/browser/loader/stream_resource_handler.h
+++ b/content/browser/loader/stream_resource_handler.h
@@ -8,8 +8,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/loader/resource_handler.h"
-#include "content/browser/streams/stream_write_observer.h"
-#include "url/gurl.h"
+#include "content/browser/loader/stream_writer.h"
namespace net {
class URLRequest;
@@ -20,8 +19,7 @@ namespace content {
class StreamRegistry;
// Redirect this resource to a stream.
mmenke 2014/10/15 20:05:43 Maybe "resource" -> "resource response"? Admitted
mmenke 2014/10/15 20:05:43 stream -> Stream
-class StreamResourceHandler : public StreamWriteObserver,
- public ResourceHandler {
+class StreamResourceHandler : public ResourceHandler {
public:
// |origin| will be used to construct the URL for the Stream. See
// WebCore::BlobURL and and WebCore::SecurityOrigin in Blink to understand
@@ -31,6 +29,8 @@ class StreamResourceHandler : public StreamWriteObserver,
const GURL& origin);
virtual ~StreamResourceHandler();
+ virtual void SetController(ResourceController* controller) override;
+
virtual bool OnUploadProgress(uint64 position, uint64 size) override;
// Not needed, as this event handler ought to be the final resource.
@@ -59,14 +59,11 @@ class StreamResourceHandler : public StreamWriteObserver,
virtual void OnDataDownloaded(int bytes_downloaded) override;
- Stream* stream() { return stream_.get(); }
+ Stream* stream() { return writer_.stream(); }
private:
- virtual void OnSpaceAvailable(Stream* stream) override;
- virtual void OnClose(Stream* stream) override;
+ StreamWriter writer_;
- scoped_refptr<Stream> stream_;
- scoped_refptr<net::IOBuffer> read_buffer_;
DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler);
mmenke 2014/10/15 20:05:43 While you're here... include base/macros.h?
};

Powered by Google App Engine
This is Rietveld 408576698