| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 bool parent_is_main_frame, | 50 bool parent_is_main_frame, |
| 51 int parent_render_frame_id, | 51 int parent_render_frame_id, |
| 52 ResourceType resource_type, | 52 ResourceType resource_type, |
| 53 ui::PageTransition transition_type, | 53 ui::PageTransition transition_type, |
| 54 bool should_replace_current_entry, | 54 bool should_replace_current_entry, |
| 55 bool is_download, | 55 bool is_download, |
| 56 bool is_stream, | 56 bool is_stream, |
| 57 bool allow_download, | 57 bool allow_download, |
| 58 bool has_user_gesture, | 58 bool has_user_gesture, |
| 59 bool enable_load_timing, | 59 bool enable_load_timing, |
| 60 bool enable_upload_progress, |
| 60 blink::WebReferrerPolicy referrer_policy, | 61 blink::WebReferrerPolicy referrer_policy, |
| 61 blink::WebPageVisibilityState visibility_state, | 62 blink::WebPageVisibilityState visibility_state, |
| 62 ResourceContext* context, | 63 ResourceContext* context, |
| 63 base::WeakPtr<ResourceMessageFilter> filter, | 64 base::WeakPtr<ResourceMessageFilter> filter, |
| 64 bool is_async); | 65 bool is_async); |
| 65 ~ResourceRequestInfoImpl() override; | 66 ~ResourceRequestInfoImpl() override; |
| 66 | 67 |
| 67 // ResourceRequestInfo implementation: | 68 // ResourceRequestInfo implementation: |
| 68 ResourceContext* GetContext() const override; | 69 ResourceContext* GetContext() const override; |
| 69 int GetChildID() const override; | 70 int GetChildID() const override; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 counted_as_in_flight_request_ = was_counted; | 158 counted_as_in_flight_request_ = was_counted; |
| 158 } | 159 } |
| 159 | 160 |
| 160 // The approximate in-memory size (bytes) that we credited this request | 161 // The approximate in-memory size (bytes) that we credited this request |
| 161 // as consuming in |outstanding_requests_memory_cost_map_|. | 162 // as consuming in |outstanding_requests_memory_cost_map_|. |
| 162 int memory_cost() const { return memory_cost_; } | 163 int memory_cost() const { return memory_cost_; } |
| 163 void set_memory_cost(int cost) { memory_cost_ = cost; } | 164 void set_memory_cost(int cost) { memory_cost_ = cost; } |
| 164 | 165 |
| 165 bool is_load_timing_enabled() const { return enable_load_timing_; } | 166 bool is_load_timing_enabled() const { return enable_load_timing_; } |
| 166 | 167 |
| 168 bool is_upload_progress_enabled() const { return enable_upload_progress_; } |
| 169 |
| 167 private: | 170 private: |
| 168 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 171 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 169 DeletedFilterDetached); | 172 DeletedFilterDetached); |
| 170 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 173 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 171 DeletedFilterDetachedRedirect); | 174 DeletedFilterDetachedRedirect); |
| 172 // Non-owning, may be NULL. | 175 // Non-owning, may be NULL. |
| 173 CrossSiteResourceHandler* cross_site_handler_; | 176 CrossSiteResourceHandler* cross_site_handler_; |
| 174 DetachableResourceHandler* detachable_handler_; | 177 DetachableResourceHandler* detachable_handler_; |
| 175 | 178 |
| 176 int process_type_; | 179 int process_type_; |
| 177 int child_id_; | 180 int child_id_; |
| 178 int route_id_; | 181 int route_id_; |
| 179 int origin_pid_; | 182 int origin_pid_; |
| 180 int request_id_; | 183 int request_id_; |
| 181 int render_frame_id_; | 184 int render_frame_id_; |
| 182 bool is_main_frame_; | 185 bool is_main_frame_; |
| 183 bool parent_is_main_frame_; | 186 bool parent_is_main_frame_; |
| 184 int parent_render_frame_id_; | 187 int parent_render_frame_id_; |
| 185 bool should_replace_current_entry_; | 188 bool should_replace_current_entry_; |
| 186 bool is_download_; | 189 bool is_download_; |
| 187 bool is_stream_; | 190 bool is_stream_; |
| 188 bool allow_download_; | 191 bool allow_download_; |
| 189 bool has_user_gesture_; | 192 bool has_user_gesture_; |
| 190 bool enable_load_timing_; | 193 bool enable_load_timing_; |
| 194 bool enable_upload_progress_; |
| 191 bool was_ignored_by_handler_; | 195 bool was_ignored_by_handler_; |
| 192 bool counted_as_in_flight_request_; | 196 bool counted_as_in_flight_request_; |
| 193 ResourceType resource_type_; | 197 ResourceType resource_type_; |
| 194 ui::PageTransition transition_type_; | 198 ui::PageTransition transition_type_; |
| 195 int memory_cost_; | 199 int memory_cost_; |
| 196 blink::WebReferrerPolicy referrer_policy_; | 200 blink::WebReferrerPolicy referrer_policy_; |
| 197 blink::WebPageVisibilityState visibility_state_; | 201 blink::WebPageVisibilityState visibility_state_; |
| 198 ResourceContext* context_; | 202 ResourceContext* context_; |
| 199 // The filter might be deleted without deleting this object if the process | 203 // The filter might be deleted without deleting this object if the process |
| 200 // exits during a transfer. | 204 // exits during a transfer. |
| 201 base::WeakPtr<ResourceMessageFilter> filter_; | 205 base::WeakPtr<ResourceMessageFilter> filter_; |
| 202 bool is_async_; | 206 bool is_async_; |
| 203 | 207 |
| 204 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 208 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
| 205 }; | 209 }; |
| 206 | 210 |
| 207 } // namespace content | 211 } // namespace content |
| 208 | 212 |
| 209 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 213 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| OLD | NEW |