| 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 28 matching lines...) Expand all Loading... |
| 39 virtual bool OnRequestRedirected(int request_id, | 39 virtual bool OnRequestRedirected(int request_id, |
| 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 OnBeforeNetworkStart(int request_id, |
| 50 const GURL& url, |
| 51 bool* defer) OVERRIDE; |
| 49 virtual bool OnWillRead(int request_id, | 52 virtual bool OnWillRead(int request_id, |
| 50 scoped_refptr<net::IOBuffer>* buf, | 53 scoped_refptr<net::IOBuffer>* buf, |
| 51 int* buf_size, | 54 int* buf_size, |
| 52 int min_size) OVERRIDE; | 55 int min_size) OVERRIDE; |
| 53 virtual bool OnReadCompleted(int request_id, | 56 virtual bool OnReadCompleted(int request_id, |
| 54 int bytes_read, | 57 int bytes_read, |
| 55 bool* defer) OVERRIDE; | 58 bool* defer) OVERRIDE; |
| 56 virtual void OnResponseCompleted(int request_id, | 59 virtual void OnResponseCompleted(int request_id, |
| 57 const net::URLRequestStatus& status, | 60 const net::URLRequestStatus& status, |
| 58 const std::string& security_info, | 61 const std::string& security_info, |
| 59 bool* defer) OVERRIDE; | 62 bool* defer) OVERRIDE; |
| 60 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) OVERRIDE; | 63 virtual void OnDataDownloaded(int request_id, int bytes_downloaded) OVERRIDE; |
| 61 | 64 |
| 62 private: | 65 private: |
| 63 enum { kReadBufSize = 3840 }; | 66 enum { kReadBufSize = 3840 }; |
| 64 | 67 |
| 65 scoped_refptr<net::IOBuffer> read_buffer_; | 68 scoped_refptr<net::IOBuffer> read_buffer_; |
| 66 | 69 |
| 67 SyncLoadResult result_; | 70 SyncLoadResult result_; |
| 68 IPC::Message* result_message_; | 71 IPC::Message* result_message_; |
| 69 ResourceDispatcherHostImpl* rdh_; | 72 ResourceDispatcherHostImpl* rdh_; |
| 70 }; | 73 }; |
| 71 | 74 |
| 72 } // namespace content | 75 } // namespace content |
| 73 | 76 |
| 74 #endif // CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ | 77 #endif // CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ |
| OLD | NEW |