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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 bool is_main_frame, | 49 bool is_main_frame, |
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 PageTransition transition_type, | 53 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 blink::WebReferrerPolicy referrer_policy, | 60 blink::WebReferrerPolicy referrer_policy, |
60 blink::WebPageVisibilityState visibility_state, | 61 blink::WebPageVisibilityState visibility_state, |
61 ResourceContext* context, | 62 ResourceContext* context, |
62 base::WeakPtr<ResourceMessageFilter> filter, | 63 base::WeakPtr<ResourceMessageFilter> filter, |
63 bool is_async); | 64 bool is_async); |
64 virtual ~ResourceRequestInfoImpl(); | 65 virtual ~ResourceRequestInfoImpl(); |
65 | 66 |
66 // ResourceRequestInfo implementation: | 67 // ResourceRequestInfo implementation: |
67 virtual ResourceContext* GetContext() const OVERRIDE; | 68 virtual ResourceContext* GetContext() const OVERRIDE; |
68 virtual int GetChildID() const OVERRIDE; | 69 virtual int GetChildID() const OVERRIDE; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 | 146 |
146 void set_was_ignored_by_handler(bool value) { | 147 void set_was_ignored_by_handler(bool value) { |
147 was_ignored_by_handler_ = value; | 148 was_ignored_by_handler_ = value; |
148 } | 149 } |
149 | 150 |
150 // The approximate in-memory size (bytes) that we credited this request | 151 // The approximate in-memory size (bytes) that we credited this request |
151 // as consuming in |outstanding_requests_memory_cost_map_|. | 152 // as consuming in |outstanding_requests_memory_cost_map_|. |
152 int memory_cost() const { return memory_cost_; } | 153 int memory_cost() const { return memory_cost_; } |
153 void set_memory_cost(int cost) { memory_cost_ = cost; } | 154 void set_memory_cost(int cost) { memory_cost_ = cost; } |
154 | 155 |
156 bool is_load_timing_enabled() const { return enable_load_timing_; } | |
157 | |
155 private: | 158 private: |
156 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 159 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
157 DeletedFilterDetached); | 160 DeletedFilterDetached); |
158 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, | 161 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
159 DeletedFilterDetachedRedirect); | 162 DeletedFilterDetachedRedirect); |
160 // Non-owning, may be NULL. | 163 // Non-owning, may be NULL. |
161 CrossSiteResourceHandler* cross_site_handler_; | 164 CrossSiteResourceHandler* cross_site_handler_; |
162 DetachableResourceHandler* detachable_handler_; | 165 DetachableResourceHandler* detachable_handler_; |
163 | 166 |
164 int process_type_; | 167 int process_type_; |
165 int child_id_; | 168 int child_id_; |
166 int route_id_; | 169 int route_id_; |
167 int origin_pid_; | 170 int origin_pid_; |
168 int request_id_; | 171 int request_id_; |
169 int render_frame_id_; | 172 int render_frame_id_; |
170 bool is_main_frame_; | 173 bool is_main_frame_; |
171 bool parent_is_main_frame_; | 174 bool parent_is_main_frame_; |
172 int parent_render_frame_id_; | 175 int parent_render_frame_id_; |
173 bool should_replace_current_entry_; | 176 bool should_replace_current_entry_; |
174 bool is_download_; | 177 bool is_download_; |
175 bool is_stream_; | 178 bool is_stream_; |
176 bool allow_download_; | 179 bool allow_download_; |
177 bool has_user_gesture_; | 180 bool has_user_gesture_; |
181 bool enable_load_timing_; | |
mmenke
2014/08/07 14:40:55
Did you do any thinking about whether we even need
| |
178 bool was_ignored_by_handler_; | 182 bool was_ignored_by_handler_; |
179 ResourceType resource_type_; | 183 ResourceType resource_type_; |
180 PageTransition transition_type_; | 184 PageTransition transition_type_; |
181 int memory_cost_; | 185 int memory_cost_; |
182 blink::WebReferrerPolicy referrer_policy_; | 186 blink::WebReferrerPolicy referrer_policy_; |
183 blink::WebPageVisibilityState visibility_state_; | 187 blink::WebPageVisibilityState visibility_state_; |
184 ResourceContext* context_; | 188 ResourceContext* context_; |
185 // The filter might be deleted without deleting this object if the process | 189 // The filter might be deleted without deleting this object if the process |
186 // exits during a transfer. | 190 // exits during a transfer. |
187 base::WeakPtr<ResourceMessageFilter> filter_; | 191 base::WeakPtr<ResourceMessageFilter> filter_; |
188 bool is_async_; | 192 bool is_async_; |
189 | 193 |
190 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 194 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
191 }; | 195 }; |
192 | 196 |
193 } // namespace content | 197 } // namespace content |
194 | 198 |
195 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 199 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |