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

Side by Side Diff: content/browser/frame_host/navigation_entry_impl.h

Issue 2174293002: NonValidatingReload: Monitor reload operations in NavigationControllerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use NavigationEntryImpl to keep ReloadType Created 4 years, 4 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "content/browser/frame_host/frame_navigation_entry.h" 15 #include "content/browser/frame_host/frame_navigation_entry.h"
16 #include "content/browser/frame_host/frame_tree_node.h" 16 #include "content/browser/frame_host/frame_tree_node.h"
17 #include "content/browser/site_instance_impl.h" 17 #include "content/browser/site_instance_impl.h"
18 #include "content/common/frame_message_enums.h" 18 #include "content/common/frame_message_enums.h"
19 #include "content/common/resource_request_body_impl.h" 19 #include "content/common/resource_request_body_impl.h"
20 #include "content/public/browser/favicon_status.h" 20 #include "content/public/browser/favicon_status.h"
21 #include "content/public/browser/global_request_id.h" 21 #include "content/public/browser/global_request_id.h"
22 #include "content/public/browser/navigation_controller.h"
Charlie Reis 2016/08/08 23:57:54 We've tried hard to avoid having a circular depend
Takashi Toyoshima 2016/08/09 12:06:17 Oh, is this why we have another RestoreType enum i
Charlie Reis 2016/08/10 05:05:13 I think this may be getting ahead of ourselves. I
22 #include "content/public/browser/navigation_entry.h" 23 #include "content/public/browser/navigation_entry.h"
23 #include "content/public/common/page_state.h" 24 #include "content/public/common/page_state.h"
24 #include "content/public/common/ssl_status.h" 25 #include "content/public/common/ssl_status.h"
25 26
26 namespace content { 27 namespace content {
27 class ResourceRequestBodyImpl; 28 class ResourceRequestBodyImpl;
28 struct CommonNavigationParams; 29 struct CommonNavigationParams;
29 struct RequestNavigationParams; 30 struct RequestNavigationParams;
30 struct StartNavigationParams; 31 struct StartNavigationParams;
31 32
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 323
323 // The RestoreType for this entry. This is set if the entry was retored. This 324 // The RestoreType for this entry. This is set if the entry was retored. This
324 // is set to RESTORE_NONE once the entry is loaded. 325 // is set to RESTORE_NONE once the entry is loaded.
325 void set_restore_type(RestoreType type) { 326 void set_restore_type(RestoreType type) {
326 restore_type_ = type; 327 restore_type_ = type;
327 } 328 }
328 RestoreType restore_type() const { 329 RestoreType restore_type() const {
329 return restore_type_; 330 return restore_type_;
330 } 331 }
331 332
333 void set_reload_type(NavigationController::ReloadType type) {
334 reload_type_ = type;
335 }
336 NavigationController::ReloadType reload_type() const {
337 return reload_type_;
338 }
339
332 void set_transferred_global_request_id( 340 void set_transferred_global_request_id(
333 const GlobalRequestID& transferred_global_request_id) { 341 const GlobalRequestID& transferred_global_request_id) {
334 transferred_global_request_id_ = transferred_global_request_id; 342 transferred_global_request_id_ = transferred_global_request_id;
335 } 343 }
336 344
337 GlobalRequestID transferred_global_request_id() const { 345 GlobalRequestID transferred_global_request_id() const {
338 return transferred_global_request_id_; 346 return transferred_global_request_id_;
339 } 347 }
340 348
341 // Whether this (pending) navigation needs to replace current entry. 349 // Whether this (pending) navigation needs to replace current entry.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 private: 404 private:
397 // Finds the TreeNode associated with |frame_tree_node|, if any. 405 // Finds the TreeNode associated with |frame_tree_node|, if any.
398 NavigationEntryImpl::TreeNode* FindFrameEntry( 406 NavigationEntryImpl::TreeNode* FindFrameEntry(
399 FrameTreeNode* frame_tree_node) const; 407 FrameTreeNode* frame_tree_node) const;
400 408
401 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 409 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
402 // Session/Tab restore save portions of this class so that it can be recreated 410 // Session/Tab restore save portions of this class so that it can be recreated
403 // later. If you add a new field that needs to be persisted you'll have to 411 // later. If you add a new field that needs to be persisted you'll have to
404 // update SessionService/TabRestoreService and Android WebView 412 // update SessionService/TabRestoreService and Android WebView
405 // state_serializer.cc appropriately. 413 // state_serializer.cc appropriately.
406 // For all new fields, update |Clone| and possibly |ResetForCommit|. 414 // For all new fields, update |Clone| and possibly |ResetForCommit|.
Charlie Reis 2016/08/08 23:57:54 Please see this warning about adding things to Nav
Takashi Toyoshima 2016/08/09 12:06:17 Oh, I didn't notice this WARNING. So, at the next
Charlie Reis 2016/08/10 05:05:13 I don't think it's safe to add something that isn'
407 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 415 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
408 416
409 // Tree of FrameNavigationEntries, one for each frame on the page. 417 // Tree of FrameNavigationEntries, one for each frame on the page.
410 // TODO(creis): Once FrameNavigationEntries can be shared across multiple 418 // TODO(creis): Once FrameNavigationEntries can be shared across multiple
411 // NavigationEntries, we will need to update Session/Tab restore. For now, 419 // NavigationEntries, we will need to update Session/Tab restore. For now,
412 // each NavigationEntry's tree has its own unshared FrameNavigationEntries. 420 // each NavigationEntry's tree has its own unshared FrameNavigationEntries.
413 std::unique_ptr<TreeNode> frame_tree_; 421 std::unique_ptr<TreeNode> frame_tree_;
414 422
415 // See the accessors above for descriptions. 423 // See the accessors above for descriptions.
416 int unique_id_; 424 int unique_id_;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 524
517 #if defined(OS_ANDROID) 525 #if defined(OS_ANDROID)
518 // The time at which Chrome received the Android Intent that triggered this 526 // The time at which Chrome received the Android Intent that triggered this
519 // URL load operation. Reset at commit and not persisted. 527 // URL load operation. Reset at commit and not persisted.
520 base::TimeTicks intent_received_timestamp_; 528 base::TimeTicks intent_received_timestamp_;
521 529
522 // Whether the URL load carries a user gesture. 530 // Whether the URL load carries a user gesture.
523 bool has_user_gesture_; 531 bool has_user_gesture_;
524 #endif 532 #endif
525 533
534 NavigationController::ReloadType reload_type_;
535
526 // Used to store extra data to support browser features. This member is not 536 // Used to store extra data to support browser features. This member is not
527 // persisted, unless specific data is taken out/put back in at save/restore 537 // persisted, unless specific data is taken out/put back in at save/restore
528 // time (see TabNavigation for an example of this). 538 // time (see TabNavigation for an example of this).
529 std::map<std::string, base::string16> extra_data_; 539 std::map<std::string, base::string16> extra_data_;
530 540
531 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); 541 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl);
532 }; 542 };
533 543
534 } // namespace content 544 } // namespace content
535 545
536 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 546 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698