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

Side by Side Diff: content/browser/loader/stream_resource_handler.h

Issue 129173002: Adds the new URLRequest::OnBeforeNetworkStart hook to the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@defer_1_net
Patch Set: Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/browser/loader/resource_handler.h" 10 #include "content/browser/loader/resource_handler.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool* defer) OVERRIDE; 42 bool* defer) OVERRIDE;
43 43
44 virtual bool OnResponseStarted(int request_id, 44 virtual bool OnResponseStarted(int request_id,
45 ResourceResponse* resp, 45 ResourceResponse* resp,
46 bool* defer) OVERRIDE; 46 bool* defer) OVERRIDE;
47 47
48 virtual bool OnWillStart(int request_id, 48 virtual bool OnWillStart(int request_id,
49 const GURL& url, 49 const GURL& url,
50 bool* defer) OVERRIDE; 50 bool* defer) OVERRIDE;
51 51
52 virtual bool OnBeforeNetworkStart(int request_id,
53 const GURL& url,
54 bool* defer) OVERRIDE;
55
52 // Create a new buffer to store received data. 56 // Create a new buffer to store received data.
53 virtual bool OnWillRead(int request_id, 57 virtual bool OnWillRead(int request_id,
54 scoped_refptr<net::IOBuffer>* buf, 58 scoped_refptr<net::IOBuffer>* buf,
55 int* buf_size, 59 int* buf_size,
56 int min_size) OVERRIDE; 60 int min_size) OVERRIDE;
57 61
58 // A read was completed, forward the data to the Stream. 62 // A read was completed, forward the data to the Stream.
59 virtual bool OnReadCompleted(int request_id, 63 virtual bool OnReadCompleted(int request_id,
60 int bytes_read, 64 int bytes_read,
61 bool* defer) OVERRIDE; 65 bool* defer) OVERRIDE;
(...skipping 12 matching lines...) Expand all
74 virtual void OnClose(Stream* stream) OVERRIDE; 78 virtual void OnClose(Stream* stream) OVERRIDE;
75 79
76 scoped_refptr<Stream> stream_; 80 scoped_refptr<Stream> stream_;
77 scoped_refptr<net::IOBuffer> read_buffer_; 81 scoped_refptr<net::IOBuffer> read_buffer_;
78 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); 82 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler);
79 }; 83 };
80 84
81 } // namespace content 85 } // namespace content
82 86
83 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ 87 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698