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