| 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 <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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 FrameMsg_UILoadMetricsReportType::NO_REPORT; | 443 FrameMsg_UILoadMetricsReportType::NO_REPORT; |
| 444 base::TimeTicks ui_timestamp = base::TimeTicks(); | 444 base::TimeTicks ui_timestamp = base::TimeTicks(); |
| 445 #if defined(OS_ANDROID) | 445 #if defined(OS_ANDROID) |
| 446 if (!intent_received_timestamp().is_null()) | 446 if (!intent_received_timestamp().is_null()) |
| 447 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; | 447 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; |
| 448 ui_timestamp = intent_received_timestamp(); | 448 ui_timestamp = intent_received_timestamp(); |
| 449 #endif | 449 #endif |
| 450 | 450 |
| 451 return CommonNavigationParams( | 451 return CommonNavigationParams( |
| 452 dest_url, dest_referrer, GetTransitionType(), navigation_type, | 452 dest_url, dest_referrer, GetTransitionType(), navigation_type, |
| 453 !IsViewSourceMode(), ui_timestamp, report_type, GetBaseURLForDataURL(), | 453 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, |
| 454 GetHistoryURLForDataURL()); | 454 GetBaseURLForDataURL(), GetHistoryURLForDataURL()); |
| 455 } | 455 } |
| 456 | 456 |
| 457 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() | 457 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() |
| 458 const { | 458 const { |
| 459 std::vector<unsigned char> browser_initiated_post_data; | 459 std::vector<unsigned char> browser_initiated_post_data; |
| 460 if (GetBrowserInitiatedPostData()) { | 460 if (GetBrowserInitiatedPostData()) { |
| 461 browser_initiated_post_data.assign( | 461 browser_initiated_post_data.assign( |
| 462 GetBrowserInitiatedPostData()->front(), | 462 GetBrowserInitiatedPostData()->front(), |
| 463 GetBrowserInitiatedPostData()->front() + | 463 GetBrowserInitiatedPostData()->front() + |
| 464 GetBrowserInitiatedPostData()->size()); | 464 GetBrowserInitiatedPostData()->size()); |
| 465 } | 465 } |
| 466 | 466 |
| 467 return StartNavigationParams( | 467 return StartNavigationParams(GetHasPostData(), extra_headers(), |
| 468 GetHasPostData(), extra_headers(), browser_initiated_post_data, | 468 browser_initiated_post_data, |
| 469 should_replace_entry(), transferred_global_request_id().child_id, | 469 transferred_global_request_id().child_id, |
| 470 transferred_global_request_id().request_id); | 470 transferred_global_request_id().request_id); |
| 471 } | 471 } |
| 472 | 472 |
| 473 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( | 473 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( |
| 474 const FrameNavigationEntry& frame_entry, | 474 const FrameNavigationEntry& frame_entry, |
| 475 base::TimeTicks navigation_start, | 475 base::TimeTicks navigation_start, |
| 476 bool is_same_document_history_load, | 476 bool is_same_document_history_load, |
| 477 bool has_committed_real_load, | 477 bool has_committed_real_load, |
| 478 bool intended_as_new_entry, | 478 bool intended_as_new_entry, |
| 479 int pending_history_list_offset, | 479 int pending_history_list_offset, |
| 480 int current_history_list_offset, | 480 int current_history_list_offset, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 return node; | 601 return node; |
| 602 } | 602 } |
| 603 // Enqueue any children and keep looking. | 603 // Enqueue any children and keep looking. |
| 604 for (auto& child : node->children) | 604 for (auto& child : node->children) |
| 605 work_queue.push(child); | 605 work_queue.push(child); |
| 606 } | 606 } |
| 607 return nullptr; | 607 return nullptr; |
| 608 } | 608 } |
| 609 | 609 |
| 610 } // namespace content | 610 } // namespace content |
| OLD | NEW |