| 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_history_load, | |
| 712 bool is_history_navigation_in_new_child, | 711 bool is_history_navigation_in_new_child, |
| 713 const std::map<std::string, bool>& subframe_unique_names, | 712 const std::map<std::string, bool>& subframe_unique_names, |
| 714 bool has_committed_real_load, | 713 bool has_committed_real_load, |
| 715 bool intended_as_new_entry, | 714 bool intended_as_new_entry, |
| 716 int pending_history_list_offset, | 715 int pending_history_list_offset, |
| 717 int current_history_list_offset, | 716 int current_history_list_offset, |
| 718 int current_history_list_length) const { | 717 int current_history_list_length) const { |
| 719 // Set the redirect chain to the navigation's redirects, unless returning to a | 718 // Set the redirect chain to the navigation's redirects, unless returning to a |
| 720 // completed navigation (whose previous redirects don't apply). | 719 // completed navigation (whose previous redirects don't apply). |
| 721 std::vector<GURL> redirects; | 720 std::vector<GURL> redirects; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 734 current_offset_to_send = -1; | 733 current_offset_to_send = -1; |
| 735 current_length_to_send = 0; | 734 current_length_to_send = 0; |
| 736 } | 735 } |
| 737 | 736 |
| 738 bool user_gesture = false; | 737 bool user_gesture = false; |
| 739 #if defined(OS_ANDROID) | 738 #if defined(OS_ANDROID) |
| 740 user_gesture = has_user_gesture(); | 739 user_gesture = has_user_gesture(); |
| 741 #endif | 740 #endif |
| 742 RequestNavigationParams request_params( | 741 RequestNavigationParams request_params( |
| 743 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), | 742 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), |
| 744 frame_entry.page_state(), GetUniqueID(), is_same_document_history_load, | 743 frame_entry.page_state(), GetUniqueID(), |
| 745 is_history_navigation_in_new_child, subframe_unique_names, | 744 is_history_navigation_in_new_child, subframe_unique_names, |
| 746 has_committed_real_load, intended_as_new_entry, pending_offset_to_send, | 745 has_committed_real_load, intended_as_new_entry, pending_offset_to_send, |
| 747 current_offset_to_send, current_length_to_send, IsViewSourceMode(), | 746 current_offset_to_send, current_length_to_send, IsViewSourceMode(), |
| 748 should_clear_history_list(), user_gesture); | 747 should_clear_history_list(), user_gesture); |
| 749 #if defined(OS_ANDROID) | 748 #if defined(OS_ANDROID) |
| 750 if (GetDataURLAsString() && | 749 if (GetDataURLAsString() && |
| 751 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) { | 750 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) { |
| 752 // The number of characters that is enough for validating a data: URI. From | 751 // 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 | 752 // 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 | 753 // the actual content. Thus we can take only the prefix of the url, to avoid |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 return node; | 956 return node; |
| 958 | 957 |
| 959 // Enqueue any children and keep looking. | 958 // Enqueue any children and keep looking. |
| 960 for (auto* child : node->children) | 959 for (auto* child : node->children) |
| 961 work_queue.push(child); | 960 work_queue.push(child); |
| 962 } | 961 } |
| 963 return nullptr; | 962 return nullptr; |
| 964 } | 963 } |
| 965 | 964 |
| 966 } // namespace content | 965 } // namespace content |
| OLD | NEW |