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

Side by Side Diff: trunk/src/content/browser/loader/buffered_resource_handler.h

Issue 26472004: Revert 227318 "Clean up ResourceHandler API." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BUFFERED_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 19 matching lines...) Expand all
30 net::URLRequest* request); 30 net::URLRequest* request);
31 virtual ~BufferedResourceHandler(); 31 virtual ~BufferedResourceHandler();
32 32
33 private: 33 private:
34 // ResourceHandler implementation: 34 // ResourceHandler implementation:
35 virtual void SetController(ResourceController* controller) OVERRIDE; 35 virtual void SetController(ResourceController* controller) OVERRIDE;
36 virtual bool OnResponseStarted(int request_id, 36 virtual bool OnResponseStarted(int request_id,
37 ResourceResponse* response, 37 ResourceResponse* response,
38 bool* defer) OVERRIDE; 38 bool* defer) OVERRIDE;
39 virtual bool OnWillRead(int request_id, 39 virtual bool OnWillRead(int request_id,
40 scoped_refptr<net::IOBuffer>* buf, 40 net::IOBuffer** buf,
41 int* buf_size, 41 int* buf_size,
42 int min_size) OVERRIDE; 42 int min_size) OVERRIDE;
43 virtual bool OnReadCompleted(int request_id, int bytes_read, 43 virtual bool OnReadCompleted(int request_id, int bytes_read,
44 bool* defer) OVERRIDE; 44 bool* defer) OVERRIDE;
45 virtual bool OnResponseCompleted(int request_id, 45 virtual bool OnResponseCompleted(int request_id,
46 const net::URLRequestStatus& status, 46 const net::URLRequestStatus& status,
47 const std::string& security_info) OVERRIDE; 47 const std::string& security_info) OVERRIDE;
48 48
49 // ResourceController implementation: 49 // ResourceController implementation:
50 virtual void Resume() OVERRIDE; 50 virtual void Resume() OVERRIDE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // OnReadCompleted) to the downstream ResourceHandler. 88 // OnReadCompleted) to the downstream ResourceHandler.
89 STATE_REPLAYING, 89 STATE_REPLAYING,
90 90
91 // In this state, we are just a blind pass-through ResourceHandler. 91 // In this state, we are just a blind pass-through ResourceHandler.
92 STATE_STREAMING 92 STATE_STREAMING
93 }; 93 };
94 State state_; 94 State state_;
95 95
96 scoped_refptr<ResourceResponse> response_; 96 scoped_refptr<ResourceResponse> response_;
97 ResourceDispatcherHostImpl* host_; 97 ResourceDispatcherHostImpl* host_;
98 net::URLRequest* request_;
98 scoped_refptr<net::IOBuffer> read_buffer_; 99 scoped_refptr<net::IOBuffer> read_buffer_;
99 int read_buffer_size_; 100 int read_buffer_size_;
100 int bytes_read_; 101 int bytes_read_;
101 102
102 bool must_download_; 103 bool must_download_;
103 bool must_download_is_set_; 104 bool must_download_is_set_;
104 105
105 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_; 106 base::WeakPtrFactory<BufferedResourceHandler> weak_ptr_factory_;
106 107
107 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler); 108 DISALLOW_COPY_AND_ASSIGN(BufferedResourceHandler);
108 }; 109 };
109 110
110 } // namespace content 111 } // namespace content
111 112
112 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_ 113 #endif // CONTENT_BROWSER_LOADER_BUFFERED_RESOURCE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698