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