Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 2484633004: Change Lo-Fi bool to bitmask to support multiple Previews types (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 664
665 return copy; 665 return copy;
666 } 666 }
667 667
668 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( 668 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams(
669 const FrameNavigationEntry& frame_entry, 669 const FrameNavigationEntry& frame_entry,
670 const scoped_refptr<ResourceRequestBodyImpl>& post_body, 670 const scoped_refptr<ResourceRequestBodyImpl>& post_body,
671 const GURL& dest_url, 671 const GURL& dest_url,
672 const Referrer& dest_referrer, 672 const Referrer& dest_referrer,
673 FrameMsg_Navigate_Type::Value navigation_type, 673 FrameMsg_Navigate_Type::Value navigation_type,
674 LoFiState lofi_state, 674 PreviewsState previews_state,
675 const base::TimeTicks& navigation_start) const { 675 const base::TimeTicks& navigation_start) const {
676 FrameMsg_UILoadMetricsReportType::Value report_type = 676 FrameMsg_UILoadMetricsReportType::Value report_type =
677 FrameMsg_UILoadMetricsReportType::NO_REPORT; 677 FrameMsg_UILoadMetricsReportType::NO_REPORT;
678 base::TimeTicks ui_timestamp = base::TimeTicks(); 678 base::TimeTicks ui_timestamp = base::TimeTicks();
679 #if defined(OS_ANDROID) 679 #if defined(OS_ANDROID)
680 if (!intent_received_timestamp().is_null()) 680 if (!intent_received_timestamp().is_null())
681 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; 681 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT;
682 ui_timestamp = intent_received_timestamp(); 682 ui_timestamp = intent_received_timestamp();
683 #endif 683 #endif
684 684
685 std::string method; 685 std::string method;
686 686
687 // TODO(clamy): Consult the FrameNavigationEntry in all modes that use 687 // TODO(clamy): Consult the FrameNavigationEntry in all modes that use
688 // subframe navigation entries. 688 // subframe navigation entries.
689 if (IsBrowserSideNavigationEnabled()) 689 if (IsBrowserSideNavigationEnabled())
690 method = frame_entry.method(); 690 method = frame_entry.method();
691 else 691 else
692 method = (post_body.get() || GetHasPostData()) ? "POST" : "GET"; 692 method = (post_body.get() || GetHasPostData()) ? "POST" : "GET";
693 693
694 return CommonNavigationParams( 694 return CommonNavigationParams(
695 dest_url, dest_referrer, GetTransitionType(), navigation_type, 695 dest_url, dest_referrer, GetTransitionType(), navigation_type,
696 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, 696 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type,
697 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), lofi_state, 697 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), previews_state,
698 navigation_start, method, post_body ? post_body : post_data_); 698 navigation_start, method, post_body ? post_body : post_data_);
699 } 699 }
700 700
701 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() 701 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams()
702 const { 702 const {
703 return StartNavigationParams(extra_headers(), 703 return StartNavigationParams(extra_headers(),
704 transferred_global_request_id().child_id, 704 transferred_global_request_id().child_id,
705 transferred_global_request_id().request_id); 705 transferred_global_request_id().request_id);
706 } 706 }
707 707
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 return node; 956 return node;
957 957
958 // Enqueue any children and keep looking. 958 // Enqueue any children and keep looking.
959 for (auto* child : node->children) 959 for (auto* child : node->children)
960 work_queue.push(child); 960 work_queue.push(child);
961 } 961 }
962 return nullptr; 962 return nullptr;
963 } 963 }
964 964
965 } // namespace content 965 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698