OLD | NEW |
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_SYNC_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/browser/loader/resource_handler.h" | 10 #include "content/browser/loader/resource_handler.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 const GURL& new_url, | 40 const GURL& new_url, |
41 ResourceResponse* response, | 41 ResourceResponse* response, |
42 bool* defer) OVERRIDE; | 42 bool* defer) OVERRIDE; |
43 virtual bool OnResponseStarted(int request_id, | 43 virtual bool OnResponseStarted(int request_id, |
44 ResourceResponse* response, | 44 ResourceResponse* response, |
45 bool* defer) OVERRIDE; | 45 bool* defer) OVERRIDE; |
46 virtual bool OnWillStart(int request_id, | 46 virtual bool OnWillStart(int request_id, |
47 const GURL& url, | 47 const GURL& url, |
48 bool* defer) OVERRIDE; | 48 bool* defer) OVERRIDE; |
49 virtual bool OnWillRead(int request_id, | 49 virtual bool OnWillRead(int request_id, |
50 scoped_refptr<net::IOBuffer>* buf, | 50 net::IOBuffer** buf, |
51 int* buf_size, | 51 int* buf_size, |
52 int min_size) OVERRIDE; | 52 int min_size) OVERRIDE; |
53 virtual bool OnReadCompleted(int request_id, | 53 virtual bool OnReadCompleted(int request_id, |
54 int bytes_read, | 54 int bytes_read, |
55 bool* defer) OVERRIDE; | 55 bool* defer) OVERRIDE; |
56 virtual bool OnResponseCompleted(int request_id, | 56 virtual bool OnResponseCompleted(int request_id, |
57 const net::URLRequestStatus& status, | 57 const net::URLRequestStatus& status, |
58 const std::string& security_info) OVERRIDE; | 58 const std::string& security_info) OVERRIDE; |
59 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) OVERRIDE; | 59 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) OVERRIDE; |
60 | 60 |
61 private: | 61 private: |
62 enum { kReadBufSize = 3840 }; | 62 enum { kReadBufSize = 3840 }; |
63 | 63 |
64 scoped_refptr<net::IOBuffer> read_buffer_; | 64 scoped_refptr<net::IOBuffer> read_buffer_; |
65 | 65 |
66 SyncLoadResult result_; | 66 SyncLoadResult result_; |
| 67 net::URLRequest* request_; |
67 IPC::Message* result_message_; | 68 IPC::Message* result_message_; |
68 ResourceDispatcherHostImpl* rdh_; | 69 ResourceDispatcherHostImpl* rdh_; |
69 }; | 70 }; |
70 | 71 |
71 } // namespace content | 72 } // namespace content |
72 | 73 |
73 #endif // CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ | 74 #endif // CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ |
OLD | NEW |