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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 | 665 |
666 return copy; | 666 return copy; |
667 } | 667 } |
668 | 668 |
669 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( | 669 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( |
670 const FrameNavigationEntry& frame_entry, | 670 const FrameNavigationEntry& frame_entry, |
671 const scoped_refptr<ResourceRequestBodyImpl>& post_body, | 671 const scoped_refptr<ResourceRequestBodyImpl>& post_body, |
672 const GURL& dest_url, | 672 const GURL& dest_url, |
673 const Referrer& dest_referrer, | 673 const Referrer& dest_referrer, |
674 FrameMsg_Navigate_Type::Value navigation_type, | 674 FrameMsg_Navigate_Type::Value navigation_type, |
675 LoFiState lofi_state, | 675 PreviewsState previews_state, |
676 const base::TimeTicks& navigation_start) const { | 676 const base::TimeTicks& navigation_start) const { |
677 FrameMsg_UILoadMetricsReportType::Value report_type = | 677 FrameMsg_UILoadMetricsReportType::Value report_type = |
678 FrameMsg_UILoadMetricsReportType::NO_REPORT; | 678 FrameMsg_UILoadMetricsReportType::NO_REPORT; |
679 base::TimeTicks ui_timestamp = base::TimeTicks(); | 679 base::TimeTicks ui_timestamp = base::TimeTicks(); |
680 #if defined(OS_ANDROID) | 680 #if defined(OS_ANDROID) |
681 if (!intent_received_timestamp().is_null()) | 681 if (!intent_received_timestamp().is_null()) |
682 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; | 682 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; |
683 ui_timestamp = intent_received_timestamp(); | 683 ui_timestamp = intent_received_timestamp(); |
684 #endif | 684 #endif |
685 | 685 |
686 std::string method; | 686 std::string method; |
687 | 687 |
688 // TODO(clamy): Consult the FrameNavigationEntry in all modes that use | 688 // TODO(clamy): Consult the FrameNavigationEntry in all modes that use |
689 // subframe navigation entries. | 689 // subframe navigation entries. |
690 if (IsBrowserSideNavigationEnabled()) | 690 if (IsBrowserSideNavigationEnabled()) |
691 method = frame_entry.method(); | 691 method = frame_entry.method(); |
692 else | 692 else |
693 method = (post_body.get() || GetHasPostData()) ? "POST" : "GET"; | 693 method = (post_body.get() || GetHasPostData()) ? "POST" : "GET"; |
694 | 694 |
695 return CommonNavigationParams( | 695 return CommonNavigationParams( |
696 dest_url, dest_referrer, GetTransitionType(), navigation_type, | 696 dest_url, dest_referrer, GetTransitionType(), navigation_type, |
697 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, | 697 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, |
698 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), lofi_state, | 698 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), previews_state, |
699 navigation_start, method, post_body ? post_body : post_data_); | 699 navigation_start, method, post_body ? post_body : post_data_); |
700 } | 700 } |
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 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 return node; | 957 return node; |
958 | 958 |
959 // Enqueue any children and keep looking. | 959 // Enqueue any children and keep looking. |
960 for (auto* child : node->children) | 960 for (auto* child : node->children) |
961 work_queue.push(child); | 961 work_queue.push(child); |
962 } | 962 } |
963 return nullptr; | 963 return nullptr; |
964 } | 964 } |
965 | 965 |
966 } // namespace content | 966 } // namespace content |
OLD | NEW |