| 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 | 695 |
| 696 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() | 696 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() |
| 697 const { | 697 const { |
| 698 return StartNavigationParams(extra_headers(), | 698 return StartNavigationParams(extra_headers(), |
| 699 transferred_global_request_id().child_id, | 699 transferred_global_request_id().child_id, |
| 700 transferred_global_request_id().request_id); | 700 transferred_global_request_id().request_id); |
| 701 } | 701 } |
| 702 | 702 |
| 703 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( | 703 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( |
| 704 const FrameNavigationEntry& frame_entry, | 704 const FrameNavigationEntry& frame_entry, |
| 705 bool is_same_document_history_load, | |
| 706 bool is_history_navigation_in_new_child, | 705 bool is_history_navigation_in_new_child, |
| 707 const std::map<std::string, bool>& subframe_unique_names, | 706 const std::map<std::string, bool>& subframe_unique_names, |
| 708 bool has_committed_real_load, | 707 bool has_committed_real_load, |
| 709 bool intended_as_new_entry, | 708 bool intended_as_new_entry, |
| 710 int pending_history_list_offset, | 709 int pending_history_list_offset, |
| 711 int current_history_list_offset, | 710 int current_history_list_offset, |
| 712 int current_history_list_length) const { | 711 int current_history_list_length) const { |
| 713 // Set the redirect chain to the navigation's redirects, unless returning to a | 712 // Set the redirect chain to the navigation's redirects, unless returning to a |
| 714 // completed navigation (whose previous redirects don't apply). | 713 // completed navigation (whose previous redirects don't apply). |
| 715 std::vector<GURL> redirects; | 714 std::vector<GURL> redirects; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 728 current_offset_to_send = -1; | 727 current_offset_to_send = -1; |
| 729 current_length_to_send = 0; | 728 current_length_to_send = 0; |
| 730 } | 729 } |
| 731 | 730 |
| 732 bool user_gesture = false; | 731 bool user_gesture = false; |
| 733 #if defined(OS_ANDROID) | 732 #if defined(OS_ANDROID) |
| 734 user_gesture = has_user_gesture(); | 733 user_gesture = has_user_gesture(); |
| 735 #endif | 734 #endif |
| 736 RequestNavigationParams request_params( | 735 RequestNavigationParams request_params( |
| 737 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), | 736 GetIsOverridingUserAgent(), redirects, GetCanLoadLocalResources(), |
| 738 frame_entry.page_state(), GetUniqueID(), is_same_document_history_load, | 737 frame_entry.page_state(), GetUniqueID(), |
| 739 is_history_navigation_in_new_child, subframe_unique_names, | 738 is_history_navigation_in_new_child, subframe_unique_names, |
| 740 has_committed_real_load, intended_as_new_entry, pending_offset_to_send, | 739 has_committed_real_load, intended_as_new_entry, pending_offset_to_send, |
| 741 current_offset_to_send, current_length_to_send, IsViewSourceMode(), | 740 current_offset_to_send, current_length_to_send, IsViewSourceMode(), |
| 742 should_clear_history_list(), user_gesture); | 741 should_clear_history_list(), user_gesture); |
| 743 #if defined(OS_ANDROID) | 742 #if defined(OS_ANDROID) |
| 744 if (GetDataURLAsString() && | 743 if (GetDataURLAsString() && |
| 745 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) { | 744 GetDataURLAsString()->size() <= kMaxLengthOfDataURLString) { |
| 746 // The number of characters that is enough for validating a data: URI. From | 745 // The number of characters that is enough for validating a data: URI. From |
| 747 // the GURL's POV, the only important part here is scheme, it doesn't check | 746 // the GURL's POV, the only important part here is scheme, it doesn't check |
| 748 // the actual content. Thus we can take only the prefix of the url, to avoid | 747 // 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... |
| 951 return node; | 950 return node; |
| 952 | 951 |
| 953 // Enqueue any children and keep looking. | 952 // Enqueue any children and keep looking. |
| 954 for (auto* child : node->children) | 953 for (auto* child : node->children) |
| 955 work_queue.push(child); | 954 work_queue.push(child); |
| 956 } | 955 } |
| 957 return nullptr; | 956 return nullptr; |
| 958 } | 957 } |
| 959 | 958 |
| 960 } // namespace content | 959 } // namespace content |
| OLD | NEW |