OLD | NEW |
---|---|
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 #include "content/browser/frame_host/navigation_entry_impl.h" | 5 #include "content/browser/frame_host/navigation_entry_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <queue> | 9 #include <queue> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/debug/dump_without_crashing.h" | 12 #include "base/debug/dump_without_crashing.h" |
13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "components/url_formatter/url_formatter.h" | 19 #include "components/url_formatter/url_formatter.h" |
20 #include "content/common/content_constants_internal.h" | 20 #include "content/common/content_constants_internal.h" |
21 #include "content/common/navigation_params.h" | 21 #include "content/common/navigation_params.h" |
22 #include "content/common/page_state_serialization.h" | 22 #include "content/common/page_state_serialization.h" |
23 #include "content/common/resource_request_body_impl.h" | 23 #include "content/common/resource_request_body_impl.h" |
24 #include "content/common/site_isolation_policy.h" | 24 #include "content/common/site_isolation_policy.h" |
25 #include "content/public/browser/reload_type.h" | |
25 #include "content/public/common/browser_side_navigation_policy.h" | 26 #include "content/public/common/browser_side_navigation_policy.h" |
26 #include "content/public/common/content_constants.h" | 27 #include "content/public/common/content_constants.h" |
27 #include "content/public/common/url_constants.h" | 28 #include "content/public/common/url_constants.h" |
28 #include "ui/gfx/text_elider.h" | 29 #include "ui/gfx/text_elider.h" |
29 | 30 |
30 using base::UTF16ToUTF8; | 31 using base::UTF16ToUTF8; |
31 | 32 |
32 namespace content { | 33 namespace content { |
33 | 34 |
34 namespace { | 35 namespace { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 title_(title), | 253 title_(title), |
253 page_id_(page_id), | 254 page_id_(page_id), |
254 transition_type_(transition_type), | 255 transition_type_(transition_type), |
255 restore_type_(RestoreType::NONE), | 256 restore_type_(RestoreType::NONE), |
256 is_overriding_user_agent_(false), | 257 is_overriding_user_agent_(false), |
257 http_status_code_(0), | 258 http_status_code_(0), |
258 is_renderer_initiated_(is_renderer_initiated), | 259 is_renderer_initiated_(is_renderer_initiated), |
259 should_replace_entry_(false), | 260 should_replace_entry_(false), |
260 should_clear_history_list_(false), | 261 should_clear_history_list_(false), |
261 can_load_local_resources_(false), | 262 can_load_local_resources_(false), |
262 frame_tree_node_id_(-1) { | 263 frame_tree_node_id_(-1), |
264 reload_type_(ReloadType::NONE) { | |
263 #if defined(OS_ANDROID) | 265 #if defined(OS_ANDROID) |
264 has_user_gesture_ = false; | 266 has_user_gesture_ = false; |
265 #endif | 267 #endif |
266 } | 268 } |
267 | 269 |
268 NavigationEntryImpl::~NavigationEntryImpl() { | 270 NavigationEntryImpl::~NavigationEntryImpl() { |
269 } | 271 } |
270 | 272 |
271 int NavigationEntryImpl::GetUniqueID() const { | 273 int NavigationEntryImpl::GetUniqueID() const { |
272 return unique_id_; | 274 return unique_id_; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
632 copy->cached_display_title_ = cached_display_title_; | 634 copy->cached_display_title_ = cached_display_title_; |
633 // ResetForCommit: transferred_global_request_id_ | 635 // ResetForCommit: transferred_global_request_id_ |
634 // ResetForCommit: should_replace_entry_ | 636 // ResetForCommit: should_replace_entry_ |
635 copy->redirect_chain_ = redirect_chain_; | 637 copy->redirect_chain_ = redirect_chain_; |
636 // ResetForCommit: should_clear_history_list_ | 638 // ResetForCommit: should_clear_history_list_ |
637 // ResetForCommit: frame_tree_node_id_ | 639 // ResetForCommit: frame_tree_node_id_ |
638 // ResetForCommit: intent_received_timestamp_ | 640 // ResetForCommit: intent_received_timestamp_ |
639 #if defined(OS_ANDROID) | 641 #if defined(OS_ANDROID) |
640 copy->has_user_gesture_ = has_user_gesture_; | 642 copy->has_user_gesture_ = has_user_gesture_; |
641 #endif | 643 #endif |
642 copy->extra_data_ = extra_data_; | 644 copy->extra_data_ = extra_data_; |
Charlie Reis
2016/09/19 22:23:51
nit: Add "// ResetForCommit: reload_type_" before
Takashi Toyoshima
2016/09/26 12:23:34
Done.
| |
643 | 645 |
644 return copy; | 646 return copy; |
645 } | 647 } |
646 | 648 |
647 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( | 649 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( |
648 const FrameNavigationEntry& frame_entry, | 650 const FrameNavigationEntry& frame_entry, |
649 const scoped_refptr<ResourceRequestBodyImpl>& post_body, | 651 const scoped_refptr<ResourceRequestBodyImpl>& post_body, |
650 const GURL& dest_url, | 652 const GURL& dest_url, |
651 const Referrer& dest_referrer, | 653 const Referrer& dest_referrer, |
652 FrameMsg_Navigate_Type::Value navigation_type, | 654 FrameMsg_Navigate_Type::Value navigation_type, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
745 // cleared here. | 747 // cleared here. |
746 // TODO(creis): This state should be moved to NavigationRequest once | 748 // TODO(creis): This state should be moved to NavigationRequest once |
747 // PlzNavigate is enabled. | 749 // PlzNavigate is enabled. |
748 SetPostData(nullptr); | 750 SetPostData(nullptr); |
749 set_is_renderer_initiated(false); | 751 set_is_renderer_initiated(false); |
750 set_transferred_global_request_id(GlobalRequestID()); | 752 set_transferred_global_request_id(GlobalRequestID()); |
751 set_should_replace_entry(false); | 753 set_should_replace_entry(false); |
752 | 754 |
753 set_should_clear_history_list(false); | 755 set_should_clear_history_list(false); |
754 set_frame_tree_node_id(-1); | 756 set_frame_tree_node_id(-1); |
757 set_reload_type(ReloadType::NONE); | |
755 | 758 |
756 if (frame_entry) | 759 if (frame_entry) |
757 frame_entry->set_source_site_instance(nullptr); | 760 frame_entry->set_source_site_instance(nullptr); |
758 | 761 |
759 #if defined(OS_ANDROID) | 762 #if defined(OS_ANDROID) |
760 // Reset the time stamp so that the metrics are not reported if this entry is | 763 // Reset the time stamp so that the metrics are not reported if this entry is |
761 // loaded again in the future. | 764 // loaded again in the future. |
762 set_intent_received_timestamp(base::TimeTicks()); | 765 set_intent_received_timestamp(base::TimeTicks()); |
763 #endif | 766 #endif |
764 } | 767 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
906 return node; | 909 return node; |
907 | 910 |
908 // Enqueue any children and keep looking. | 911 // Enqueue any children and keep looking. |
909 for (auto* child : node->children) | 912 for (auto* child : node->children) |
910 work_queue.push(child); | 913 work_queue.push(child); |
911 } | 914 } |
912 return nullptr; | 915 return nullptr; |
913 } | 916 } |
914 | 917 |
915 } // namespace content | 918 } // namespace content |
OLD | NEW |