Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: content/common/navigation_params.h

Issue 2454233002: Fix history nav to a script-injected about:blank frame. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/common/navigation_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_COMMON_NAVIGATION_PARAMS_H_ 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <map>
11 #include <string> 11 #include <string>
12 12
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/common/frame_message_enums.h" 17 #include "content/common/frame_message_enums.h"
18 #include "content/common/resource_request_body_impl.h" 18 #include "content/common/resource_request_body_impl.h"
19 #include "content/public/common/page_state.h" 19 #include "content/public/common/page_state.h"
20 #include "content/public/common/referrer.h" 20 #include "content/public/common/referrer.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 RequestNavigationParams(); 222 RequestNavigationParams();
223 RequestNavigationParams(bool is_overriding_user_agent, 223 RequestNavigationParams(bool is_overriding_user_agent,
224 const std::vector<GURL>& redirects, 224 const std::vector<GURL>& redirects,
225 bool can_load_local_resources, 225 bool can_load_local_resources,
226 base::Time request_time, 226 base::Time request_time,
227 const PageState& page_state, 227 const PageState& page_state,
228 int32_t page_id, 228 int32_t page_id,
229 int nav_entry_id, 229 int nav_entry_id,
230 bool is_same_document_history_load, 230 bool is_same_document_history_load,
231 bool is_history_navigation_in_new_child, 231 bool is_history_navigation_in_new_child,
232 std::set<std::string> subframe_unique_names, 232 std::map<std::string, bool> subframe_unique_names,
233 bool has_committed_real_load, 233 bool has_committed_real_load,
234 bool intended_as_new_entry, 234 bool intended_as_new_entry,
235 int pending_history_list_offset, 235 int pending_history_list_offset,
236 int current_history_list_offset, 236 int current_history_list_offset,
237 int current_history_list_length, 237 int current_history_list_length,
238 bool is_view_source, 238 bool is_view_source,
239 bool should_clear_history_list); 239 bool should_clear_history_list);
240 RequestNavigationParams(const RequestNavigationParams& other); 240 RequestNavigationParams(const RequestNavigationParams& other);
241 ~RequestNavigationParams(); 241 ~RequestNavigationParams();
242 242
(...skipping 30 matching lines...) Expand all
273 273
274 // For history navigations, this indicates whether the load will stay within 274 // For history navigations, this indicates whether the load will stay within
275 // the same document. Defaults to false. 275 // the same document. Defaults to false.
276 bool is_same_document_history_load; 276 bool is_same_document_history_load;
277 277
278 // Whether this is a history navigation in a newly created child frame, in 278 // Whether this is a history navigation in a newly created child frame, in
279 // which case the browser process is instructing the renderer process to load 279 // which case the browser process is instructing the renderer process to load
280 // a URL from a session history item. Defaults to false. 280 // a URL from a session history item. Defaults to false.
281 bool is_history_navigation_in_new_child; 281 bool is_history_navigation_in_new_child;
282 282
283 // If this is a history navigation, this contains a set of frame unique names 283 // If this is a history navigation, this contains a map of frame unique names
284 // for immediate children of the frame being navigated for which there are 284 // to |is_about_blank| for immediate children of the frame being navigated for
285 // history items. The renderer process only needs to check with the browser 285 // which there are history items. The renderer process only needs to check
286 // process for newly created subframes that have these unique names. 286 // with the browser process for newly created subframes that have these unique
287 // names (and only when not staying on about:blank).
287 // TODO(creis): Expand this to a data structure including corresponding 288 // TODO(creis): Expand this to a data structure including corresponding
288 // same-process PageStates as well in https://crbug.com/639842. 289 // same-process PageStates for the whole subtree in https://crbug.com/639842.
289 std::set<std::string> subframe_unique_names; 290 std::map<std::string, bool> subframe_unique_names;
290 291
291 // Whether the frame being navigated has already committed a real page, which 292 // Whether the frame being navigated has already committed a real page, which
292 // affects how new navigations are classified in the renderer process. 293 // affects how new navigations are classified in the renderer process.
293 // This currently is only ever set to true in --site-per-process mode. 294 // This currently is only ever set to true in --site-per-process mode.
294 // TODO(creis): Create FrameNavigationEntries by default so this always works. 295 // TODO(creis): Create FrameNavigationEntries by default so this always works.
295 bool has_committed_real_load; 296 bool has_committed_real_load;
296 297
297 // For browser-initiated navigations, this is true if this is a new entry 298 // For browser-initiated navigations, this is true if this is a new entry
298 // being navigated to. This is false otherwise. TODO(avi): Remove this when 299 // being navigated to. This is false otherwise. TODO(avi): Remove this when
299 // the pending entry situation is made sane and the browser keeps them around 300 // the pending entry situation is made sane and the browser keeps them around
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 ~NavigationParams(); 347 ~NavigationParams();
347 348
348 CommonNavigationParams common_params; 349 CommonNavigationParams common_params;
349 StartNavigationParams start_params; 350 StartNavigationParams start_params;
350 RequestNavigationParams request_params; 351 RequestNavigationParams request_params;
351 }; 352 };
352 353
353 } // namespace content 354 } // namespace content
354 355
355 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 356 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/common/navigation_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698