| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool enable_upload_progress, |
| 61 bool do_not_prompt_for_login, |
| 61 blink::WebReferrerPolicy referrer_policy, | 62 blink::WebReferrerPolicy referrer_policy, |
| 62 blink::WebPageVisibilityState visibility_state, | 63 blink::WebPageVisibilityState visibility_state, |
| 63 ResourceContext* context, | 64 ResourceContext* context, |
| 64 base::WeakPtr<ResourceMessageFilter> filter, | 65 base::WeakPtr<ResourceMessageFilter> filter, |
| 65 bool is_async); | 66 bool is_async); |
| 66 ~ResourceRequestInfoImpl() override; | 67 ~ResourceRequestInfoImpl() override; |
| 67 | 68 |
| 68 // ResourceRequestInfo implementation: | 69 // ResourceRequestInfo implementation: |
| 69 ResourceContext* GetContext() const override; | 70 ResourceContext* GetContext() const override; |
| 70 int GetChildID() const override; | 71 int GetChildID() const override; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 168 bool is_upload_progress_enabled() const { return enable_upload_progress_; } | 169 bool is_upload_progress_enabled() const { return enable_upload_progress_; } |
| 169 | 170 |
| 171 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; } |
| 172 void set_do_not_prompt_for_login(bool do_not_prompt) { |
| 173 do_not_prompt_for_login_ = do_not_prompt; |
| 174 } |
| 175 |
| 170 private: | 176 private: |
| 171 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 177 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 172 DeletedFilterDetached); | 178 DeletedFilterDetached); |
| 173 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 179 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
| 174 DeletedFilterDetachedRedirect); | 180 DeletedFilterDetachedRedirect); |
| 175 // Non-owning, may be NULL. | 181 // Non-owning, may be NULL. |
| 176 CrossSiteResourceHandler* cross_site_handler_; | 182 CrossSiteResourceHandler* cross_site_handler_; |
| 177 DetachableResourceHandler* detachable_handler_; | 183 DetachableResourceHandler* detachable_handler_; |
| 178 | 184 |
| 179 int process_type_; | 185 int process_type_; |
| 180 int child_id_; | 186 int child_id_; |
| 181 int route_id_; | 187 int route_id_; |
| 182 int origin_pid_; | 188 int origin_pid_; |
| 183 int request_id_; | 189 int request_id_; |
| 184 int render_frame_id_; | 190 int render_frame_id_; |
| 185 bool is_main_frame_; | 191 bool is_main_frame_; |
| 186 bool parent_is_main_frame_; | 192 bool parent_is_main_frame_; |
| 187 int parent_render_frame_id_; | 193 int parent_render_frame_id_; |
| 188 bool should_replace_current_entry_; | 194 bool should_replace_current_entry_; |
| 189 bool is_download_; | 195 bool is_download_; |
| 190 bool is_stream_; | 196 bool is_stream_; |
| 191 bool allow_download_; | 197 bool allow_download_; |
| 192 bool has_user_gesture_; | 198 bool has_user_gesture_; |
| 193 bool enable_load_timing_; | 199 bool enable_load_timing_; |
| 194 bool enable_upload_progress_; | 200 bool enable_upload_progress_; |
| 201 bool do_not_prompt_for_login_; |
| 195 bool was_ignored_by_handler_; | 202 bool was_ignored_by_handler_; |
| 196 bool counted_as_in_flight_request_; | 203 bool counted_as_in_flight_request_; |
| 197 ResourceType resource_type_; | 204 ResourceType resource_type_; |
| 198 ui::PageTransition transition_type_; | 205 ui::PageTransition transition_type_; |
| 199 int memory_cost_; | 206 int memory_cost_; |
| 200 blink::WebReferrerPolicy referrer_policy_; | 207 blink::WebReferrerPolicy referrer_policy_; |
| 201 blink::WebPageVisibilityState visibility_state_; | 208 blink::WebPageVisibilityState visibility_state_; |
| 202 ResourceContext* context_; | 209 ResourceContext* context_; |
| 203 // The filter might be deleted without deleting this object if the process | 210 // The filter might be deleted without deleting this object if the process |
| 204 // exits during a transfer. | 211 // exits during a transfer. |
| 205 base::WeakPtr<ResourceMessageFilter> filter_; | 212 base::WeakPtr<ResourceMessageFilter> filter_; |
| 206 bool is_async_; | 213 bool is_async_; |
| 207 | 214 |
| 208 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 215 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
| 209 }; | 216 }; |
| 210 | 217 |
| 211 } // namespace content | 218 } // namespace content |
| 212 | 219 |
| 213 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 220 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
| OLD | NEW |