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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 void OnRequestRedirected( | 36 void OnRequestRedirected( |
37 const net::RedirectInfo& redirect_info, | 37 const net::RedirectInfo& redirect_info, |
38 ResourceResponse* response, | 38 ResourceResponse* response, |
39 std::unique_ptr<ResourceController> controller) override; | 39 std::unique_ptr<ResourceController> controller) override; |
40 void OnResponseStarted( | 40 void OnResponseStarted( |
41 ResourceResponse* response, | 41 ResourceResponse* response, |
42 std::unique_ptr<ResourceController> controller) override; | 42 std::unique_ptr<ResourceController> controller) override; |
43 void OnWillStart(const GURL& url, | 43 void OnWillStart(const GURL& url, |
44 std::unique_ptr<ResourceController> controller) override; | 44 std::unique_ptr<ResourceController> controller) override; |
45 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 45 void OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
46 int* buf_size) override; | 46 int* buf_size, |
| 47 std::unique_ptr<ResourceController> controller) override; |
47 void OnReadCompleted(int bytes_read, | 48 void OnReadCompleted(int bytes_read, |
48 std::unique_ptr<ResourceController> controller) override; | 49 std::unique_ptr<ResourceController> controller) override; |
49 void OnResponseCompleted( | 50 void OnResponseCompleted( |
50 const net::URLRequestStatus& status, | 51 const net::URLRequestStatus& status, |
51 std::unique_ptr<ResourceController> controller) override; | 52 std::unique_ptr<ResourceController> controller) override; |
52 void OnDataDownloaded(int bytes_downloaded) override; | 53 void OnDataDownloaded(int bytes_downloaded) override; |
53 | 54 |
54 private: | 55 private: |
55 enum { kReadBufSize = 3840 }; | 56 enum { kReadBufSize = 3840 }; |
56 | 57 |
57 scoped_refptr<net::IOBuffer> read_buffer_; | 58 scoped_refptr<net::IOBuffer> read_buffer_; |
58 | 59 |
59 SyncLoadResult result_; | 60 SyncLoadResult result_; |
60 SyncLoadResultCallback result_handler_; | 61 SyncLoadResultCallback result_handler_; |
61 ResourceDispatcherHostImpl* rdh_; | 62 ResourceDispatcherHostImpl* rdh_; |
62 int64_t total_transfer_size_; | 63 int64_t total_transfer_size_; |
63 }; | 64 }; |
64 | 65 |
65 } // namespace content | 66 } // namespace content |
66 | 67 |
67 #endif // CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ | 68 #endif // CONTENT_BROWSER_LOADER_SYNC_RESOURCE_HANDLER_H_ |
OLD | NEW |