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_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 void set_is_download(bool download) { is_download_ = download; } | 141 void set_is_download(bool download) { is_download_ = download; } |
142 | 142 |
143 // Whether this is a stream. | 143 // Whether this is a stream. |
144 bool is_stream() const { return is_stream_; } | 144 bool is_stream() const { return is_stream_; } |
145 void set_is_stream(bool stream) { is_stream_ = stream; } | 145 void set_is_stream(bool stream) { is_stream_ = stream; } |
146 | 146 |
147 void set_was_ignored_by_handler(bool value) { | 147 void set_was_ignored_by_handler(bool value) { |
148 was_ignored_by_handler_ = value; | 148 was_ignored_by_handler_ = value; |
149 } | 149 } |
150 | 150 |
| 151 // Whether this request has been counted towards the number of in flight |
| 152 // requests, which is only true for requests that require a file descriptor |
| 153 // for their shared memory buffer. |
| 154 bool counted_as_in_flight_request() const { |
| 155 return counted_as_in_flight_request_; |
| 156 } |
| 157 void set_counted_as_in_flight_request(bool was_counted) { |
| 158 counted_as_in_flight_request_ = was_counted; |
| 159 } |
| 160 |
151 // The approximate in-memory size (bytes) that we credited this request | 161 // The approximate in-memory size (bytes) that we credited this request |
152 // as consuming in |outstanding_requests_memory_cost_map_|. | 162 // as consuming in |outstanding_requests_memory_cost_map_|. |
153 int memory_cost() const { return memory_cost_; } | 163 int memory_cost() const { return memory_cost_; } |
154 void set_memory_cost(int cost) { memory_cost_ = cost; } | 164 void set_memory_cost(int cost) { memory_cost_ = cost; } |
155 | 165 |
156 bool is_load_timing_enabled() const { return enable_load_timing_; } | 166 bool is_load_timing_enabled() const { return enable_load_timing_; } |
157 | 167 |
158 private: | 168 private: |
159 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 169 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
160 DeletedFilterDetached); | 170 DeletedFilterDetached); |
(...skipping 12 matching lines...) Expand all Loading... |
173 bool is_main_frame_; | 183 bool is_main_frame_; |
174 bool parent_is_main_frame_; | 184 bool parent_is_main_frame_; |
175 int parent_render_frame_id_; | 185 int parent_render_frame_id_; |
176 bool should_replace_current_entry_; | 186 bool should_replace_current_entry_; |
177 bool is_download_; | 187 bool is_download_; |
178 bool is_stream_; | 188 bool is_stream_; |
179 bool allow_download_; | 189 bool allow_download_; |
180 bool has_user_gesture_; | 190 bool has_user_gesture_; |
181 bool enable_load_timing_; | 191 bool enable_load_timing_; |
182 bool was_ignored_by_handler_; | 192 bool was_ignored_by_handler_; |
| 193 bool counted_as_in_flight_request_; |
183 ResourceType resource_type_; | 194 ResourceType resource_type_; |
184 ui::PageTransition transition_type_; | 195 ui::PageTransition transition_type_; |
185 int memory_cost_; | 196 int memory_cost_; |
186 blink::WebReferrerPolicy referrer_policy_; | 197 blink::WebReferrerPolicy referrer_policy_; |
187 blink::WebPageVisibilityState visibility_state_; | 198 blink::WebPageVisibilityState visibility_state_; |
188 ResourceContext* context_; | 199 ResourceContext* context_; |
189 // The filter might be deleted without deleting this object if the process | 200 // The filter might be deleted without deleting this object if the process |
190 // exits during a transfer. | 201 // exits during a transfer. |
191 base::WeakPtr<ResourceMessageFilter> filter_; | 202 base::WeakPtr<ResourceMessageFilter> filter_; |
192 bool is_async_; | 203 bool is_async_; |
193 | 204 |
194 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 205 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
195 }; | 206 }; |
196 | 207 |
197 } // namespace content | 208 } // namespace content |
198 | 209 |
199 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 210 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |