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

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

Issue 1255103003: Fix race when reloading original URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 4 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 copy->redirect_chain_ = redirect_chain_; 428 copy->redirect_chain_ = redirect_chain_;
429 // ResetForCommit: should_clear_history_list_ 429 // ResetForCommit: should_clear_history_list_
430 // ResetForCommit: frame_tree_node_id_ 430 // ResetForCommit: frame_tree_node_id_
431 // ResetForCommit: intent_received_timestamp_ 431 // ResetForCommit: intent_received_timestamp_
432 copy->extra_data_ = extra_data_; 432 copy->extra_data_ = extra_data_;
433 433
434 return copy.Pass(); 434 return copy.Pass();
435 } 435 }
436 436
437 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( 437 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams(
438 const GURL& dest_url,
439 const Referrer& dest_referrer,
438 const FrameNavigationEntry& frame_entry, 440 const FrameNavigationEntry& frame_entry,
439 FrameMsg_Navigate_Type::Value navigation_type) const { 441 FrameMsg_Navigate_Type::Value navigation_type) const {
440 FrameMsg_UILoadMetricsReportType::Value report_type = 442 FrameMsg_UILoadMetricsReportType::Value report_type =
441 FrameMsg_UILoadMetricsReportType::NO_REPORT; 443 FrameMsg_UILoadMetricsReportType::NO_REPORT;
442 base::TimeTicks ui_timestamp = base::TimeTicks(); 444 base::TimeTicks ui_timestamp = base::TimeTicks();
443 #if defined(OS_ANDROID) 445 #if defined(OS_ANDROID)
444 if (!intent_received_timestamp().is_null()) 446 if (!intent_received_timestamp().is_null())
445 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; 447 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT;
446 ui_timestamp = intent_received_timestamp(); 448 ui_timestamp = intent_received_timestamp();
447 #endif 449 #endif
448 450
449 return CommonNavigationParams( 451 return CommonNavigationParams(
450 frame_entry.url(), frame_entry.referrer(), GetTransitionType(), 452 dest_url, dest_referrer, GetTransitionType(), navigation_type,
451 navigation_type, !IsViewSourceMode(), ui_timestamp, report_type, 453 !IsViewSourceMode(), ui_timestamp, report_type, GetBaseURLForDataURL(),
452 GetBaseURLForDataURL(), GetHistoryURLForDataURL()); 454 GetHistoryURLForDataURL());
453 } 455 }
454 456
455 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() 457 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams()
456 const { 458 const {
457 std::vector<unsigned char> browser_initiated_post_data; 459 std::vector<unsigned char> browser_initiated_post_data;
458 if (GetBrowserInitiatedPostData()) { 460 if (GetBrowserInitiatedPostData()) {
459 browser_initiated_post_data.assign( 461 browser_initiated_post_data.assign(
460 GetBrowserInitiatedPostData()->front(), 462 GetBrowserInitiatedPostData()->front(),
461 GetBrowserInitiatedPostData()->front() + 463 GetBrowserInitiatedPostData()->front() +
462 GetBrowserInitiatedPostData()->size()); 464 GetBrowserInitiatedPostData()->size());
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 return node; 606 return node;
605 } 607 }
606 // Enqueue any children and keep looking. 608 // Enqueue any children and keep looking.
607 for (auto& child : node->children) 609 for (auto& child : node->children)
608 work_queue.push(child); 610 work_queue.push(child);
609 } 611 }
610 return nullptr; 612 return nullptr;
611 } 613 }
612 614
613 } // namespace content 615 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/frame_host/navigation_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698