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

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

Issue 1182453002: PlzNavigate: support for should_replace_current_entry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 6 months 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 <queue> 7 #include <queue>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 FrameMsg_UILoadMetricsReportType::NO_REPORT; 423 FrameMsg_UILoadMetricsReportType::NO_REPORT;
424 base::TimeTicks ui_timestamp = base::TimeTicks(); 424 base::TimeTicks ui_timestamp = base::TimeTicks();
425 #if defined(OS_ANDROID) 425 #if defined(OS_ANDROID)
426 if (!intent_received_timestamp().is_null()) 426 if (!intent_received_timestamp().is_null())
427 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; 427 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT;
428 ui_timestamp = intent_received_timestamp(); 428 ui_timestamp = intent_received_timestamp();
429 #endif 429 #endif
430 430
431 return CommonNavigationParams( 431 return CommonNavigationParams(
432 frame_entry.url(), frame_entry.referrer(), GetTransitionType(), 432 frame_entry.url(), frame_entry.referrer(), GetTransitionType(),
433 navigation_type, !IsViewSourceMode(), ui_timestamp, report_type, 433 navigation_type, !IsViewSourceMode(), should_replace_entry(),
434 GetBaseURLForDataURL(), GetHistoryURLForDataURL()); 434 ui_timestamp, report_type, GetBaseURLForDataURL(),
435 GetHistoryURLForDataURL());
435 } 436 }
436 437
437 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() 438 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams()
438 const { 439 const {
439 std::vector<unsigned char> browser_initiated_post_data; 440 std::vector<unsigned char> browser_initiated_post_data;
440 if (GetBrowserInitiatedPostData()) { 441 if (GetBrowserInitiatedPostData()) {
441 browser_initiated_post_data.assign( 442 browser_initiated_post_data.assign(
442 GetBrowserInitiatedPostData()->front(), 443 GetBrowserInitiatedPostData()->front(),
443 GetBrowserInitiatedPostData()->front() + 444 GetBrowserInitiatedPostData()->front() +
444 GetBrowserInitiatedPostData()->size()); 445 GetBrowserInitiatedPostData()->size());
445 } 446 }
446 447
447 return StartNavigationParams( 448 return StartNavigationParams(GetHasPostData(), extra_headers(),
448 GetHasPostData(), extra_headers(), browser_initiated_post_data, 449 browser_initiated_post_data,
449 should_replace_entry(), transferred_global_request_id().child_id, 450 transferred_global_request_id().child_id,
450 transferred_global_request_id().request_id); 451 transferred_global_request_id().request_id);
451 } 452 }
452 453
453 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( 454 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams(
454 const FrameNavigationEntry& frame_entry, 455 const FrameNavigationEntry& frame_entry,
455 base::TimeTicks navigation_start, 456 base::TimeTicks navigation_start,
456 bool is_same_document_history_load, 457 bool is_same_document_history_load,
457 bool has_committed_real_load, 458 bool has_committed_real_load,
458 bool intended_as_new_entry, 459 bool intended_as_new_entry,
459 int pending_history_list_offset, 460 int pending_history_list_offset,
460 int current_history_list_offset, 461 int current_history_list_offset,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 return node; 587 return node;
587 } 588 }
588 // Enqueue any children and keep looking. 589 // Enqueue any children and keep looking.
589 for (auto& child : node->children) 590 for (auto& child : node->children)
590 work_queue.push(child); 591 work_queue.push(child);
591 } 592 }
592 return nullptr; 593 return nullptr;
593 } 594 }
594 595
595 } // namespace content 596 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698