OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // Returns the last updated state of the load. This is updated periodically | 122 // Returns the last updated state of the load. This is updated periodically |
123 // by the ResourceDispatcherHost and tracked here so we don't send out | 123 // by the ResourceDispatcherHost and tracked here so we don't send out |
124 // unnecessary state change notifications. | 124 // unnecessary state change notifications. |
125 net::LoadState last_load_state() const { return last_load_state_; } | 125 net::LoadState last_load_state() const { return last_load_state_; } |
126 void set_last_load_state(net::LoadState s) { last_load_state_ = s; } | 126 void set_last_load_state(net::LoadState s) { last_load_state_ = s; } |
127 | 127 |
128 // When there is upload data, this is the byte count of that data. When there | 128 // When there is upload data, this is the byte count of that data. When there |
129 // is no upload, this will be 0. | 129 // is no upload, this will be 0. |
130 uint64 upload_size() const { return upload_size_; } | 130 uint64 upload_size() const { return upload_size_; } |
| 131 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } |
131 | 132 |
132 // When we're uploading data, this is the the byte offset into the uploaded | 133 // When we're uploading data, this is the the byte offset into the uploaded |
133 // data that we've uploaded that we've send an upload progress update about. | 134 // data that we've uploaded that we've send an upload progress update about. |
134 // The ResourceDispatcherHost will periodically update this value to track | 135 // The ResourceDispatcherHost will periodically update this value to track |
135 // upload progress and make sure it doesn't sent out duplicate updates. | 136 // upload progress and make sure it doesn't sent out duplicate updates. |
136 uint64 last_upload_position() const { return last_upload_position_; } | 137 uint64 last_upload_position() const { return last_upload_position_; } |
137 void set_last_upload_position(uint64 p) { last_upload_position_ = p; } | 138 void set_last_upload_position(uint64 p) { last_upload_position_ = p; } |
138 | 139 |
139 // Indicates when the ResourceDispatcherHost last update the upload | 140 // Indicates when the ResourceDispatcherHost last update the upload |
140 // position. This is used to make sure we don't send too many updates. | 141 // position. This is used to make sure we don't send too many updates. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 227 |
227 // Contains the id of the host renderer. | 228 // Contains the id of the host renderer. |
228 int host_renderer_id_; | 229 int host_renderer_id_; |
229 // Contains the id of the host render view. | 230 // Contains the id of the host render view. |
230 int host_render_view_id_; | 231 int host_render_view_id_; |
231 | 232 |
232 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); | 233 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); |
233 }; | 234 }; |
234 | 235 |
235 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ | 236 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ |
OLD | NEW |