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

Side by Side Diff: chrome/browser/renderer_host/async_resource_handler.h

Issue 159561: Add CHECKs to the ResourceHandler derived classes to see which is returning a NULL IOBuffer:data_. (Closed)
Patch Set: Add comments. Add missing .h file. Created 11 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/async_resource_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 20 matching lines...) Expand all
31 bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, 31 bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
32 int min_size); 32 int min_size);
33 bool OnReadCompleted(int request_id, int* bytes_read); 33 bool OnReadCompleted(int request_id, int* bytes_read);
34 bool OnResponseCompleted(int request_id, 34 bool OnResponseCompleted(int request_id,
35 const URLRequestStatus& status, 35 const URLRequestStatus& status,
36 const std::string& security_info); 36 const std::string& security_info);
37 37
38 static void GlobalCleanup(); 38 static void GlobalCleanup();
39 39
40 private: 40 private:
41 // When reading, we don't know if we are going to get EOF (0 bytes read), so
42 // we typically have a buffer that we allocated but did not use. We keep
43 // this buffer around for the next read as a small optimization.
44 static SharedIOBuffer* spare_read_buffer_;
45
46 scoped_refptr<SharedIOBuffer> read_buffer_; 41 scoped_refptr<SharedIOBuffer> read_buffer_;
47 ResourceDispatcherHost::Receiver* receiver_; 42 ResourceDispatcherHost::Receiver* receiver_;
48 int process_id_; 43 int process_id_;
49 int routing_id_; 44 int routing_id_;
50 base::ProcessHandle process_handle_; 45 base::ProcessHandle process_handle_;
51 ResourceDispatcherHost* rdh_; 46 ResourceDispatcherHost* rdh_;
52 47
53 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler); 48 DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler);
54 }; 49 };
55 50
56 #endif // CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_ 51 #endif // CHROME_BROWSER_RENDERER_HOST_ASYNC_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/async_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698