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> |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 701 |
702 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() | 702 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() |
703 const { | 703 const { |
704 return StartNavigationParams(extra_headers(), | 704 return StartNavigationParams(extra_headers(), |
705 transferred_global_request_id().child_id, | 705 transferred_global_request_id().child_id, |
706 transferred_global_request_id().request_id); | 706 transferred_global_request_id().request_id); |
707 } | 707 } |
708 | 708 |
709 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( | 709 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( |
710 const FrameNavigationEntry& frame_entry, | 710 const FrameNavigationEntry& frame_entry, |
| 711 bool is_same_document_fragment_change, |
711 bool is_same_document_history_load, | 712 bool is_same_document_history_load, |
712 bool is_history_navigation_in_new_child, | 713 bool is_history_navigation_in_new_child, |
713 const std::map<std::string, bool>& subframe_unique_names, | 714 const std::map<std::string, bool>& subframe_unique_names, |
714 bool has_committed_real_load, | 715 bool has_committed_real_load, |
715 bool intended_as_new_entry, | 716 bool intended_as_new_entry, |
716 int pending_history_list_offset, | 717 int pending_history_list_offset, |
717 int current_history_list_offset, | 718 int current_history_list_offset, |
718 int current_history_list_length) const { | 719 int current_history_list_length) const { |
719 // Set the redirect chain to the navigation's redirects, unless returning to a | 720 // Set the redirect chain to the navigation's redirects, unless returning to a |
720 // completed navigation (whose previous redirects don't apply). | 721 // completed navigation (whose previous redirects don't apply). |
(...skipping 13 matching lines...) Expand all Loading... |
734 current_offset_to_send = -1; | 735 current_offset_to_send = -1; |
735 current_length_to_send = 0; | 736 current_length_to_send = 0; |
736 } | 737 } |
737 | 738 |
738 bool user_gesture = false; | 739 bool user_gesture = false; |
739 #if defined(OS_ANDROID) | 740 #if defined(OS_ANDROID) |
740 user_gesture = has_user_gesture(); | 741 user_gesture = has_user_gesture(); |
741 #endif | 742 #endif |
742 RequestNavigationParams request_params( | 743 RequestNavigationParams request_params( |
743 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), | 744 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), |
744 frame_entry.page_state(), GetUniqueID(), is_same_document_history_load, | 745 frame_entry.page_state(), GetUniqueID(), is_same_document_fragment_change, |
745 is_history_navigation_in_new_child, subframe_unique_names, | 746 is_same_document_history_load, is_history_navigation_in_new_child, |
746 has_committed_real_load, intended_as_new_entry, pending_offset_to_send, | 747 subframe_unique_names, has_committed_real_load, intended_as_new_entry, |
747 current_offset_to_send, current_length_to_send, IsViewSourceMode(), | 748 pending_offset_to_send, current_offset_to_send, current_length_to_send, |
748 should_clear_history_list(), user_gesture); | 749 IsViewSourceMode(), should_clear_history_list(), user_gesture); |
749 #if defined(OS_ANDROID) | 750 #if defined(OS_ANDROID) |
750 if (GetDataURLAsString() && | 751 if (GetDataURLAsString() && |
751 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) { | 752 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) { |
752 // The number of characters that is enough for validating a data: URI. From | 753 // The number of characters that is enough for validating a data: URI. From |
753 // the GURL's POV, the only important part here is scheme, it doesn't check | 754 // the GURL's POV, the only important part here is scheme, it doesn't check |
754 // the actual content. Thus we can take only the prefix of the url, to avoid | 755 // the actual content. Thus we can take only the prefix of the url, to avoid |
755 // unneeded copying of a potentially long string. | 756 // unneeded copying of a potentially long string. |
756 const size_t kDataUriPrefixMaxLen = 64; | 757 const size_t kDataUriPrefixMaxLen = 64; |
757 GURL data_url(std::string( | 758 GURL data_url(std::string( |
758 GetDataURLAsString()->front_as<char>(), | 759 GetDataURLAsString()->front_as<char>(), |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 return node; | 958 return node; |
958 | 959 |
959 // Enqueue any children and keep looking. | 960 // Enqueue any children and keep looking. |
960 for (auto* child : node->children) | 961 for (auto* child : node->children) |
961 work_queue.push(child); | 962 work_queue.push(child); |
962 } | 963 } |
963 return nullptr; | 964 return nullptr; |
964 } | 965 } |
965 | 966 |
966 } // namespace content | 967 } // namespace content |
OLD | NEW |