Chromium Code Reviews| 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/navigator_impl.h" | 5 #include "content/browser/frame_host/navigator_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 595 ui::PAGE_TRANSITION_FORWARD_BACK)) { | 595 ui::PAGE_TRANSITION_FORWARD_BACK)) { |
| 596 transition_type = ui::PageTransitionFromInt( | 596 transition_type = ui::PageTransitionFromInt( |
| 597 params.transition | ui::PAGE_TRANSITION_FORWARD_BACK); | 597 params.transition | ui::PAGE_TRANSITION_FORWARD_BACK); |
| 598 } | 598 } |
| 599 | 599 |
| 600 delegate_->DidCommitProvisionalLoad(render_frame_host, | 600 delegate_->DidCommitProvisionalLoad(render_frame_host, |
| 601 params.url, | 601 params.url, |
| 602 transition_type); | 602 transition_type); |
| 603 render_frame_host->navigation_handle()->DidCommitNavigation( | 603 render_frame_host->navigation_handle()->DidCommitNavigation( |
| 604 params, is_navigation_within_page, render_frame_host); | 604 params, is_navigation_within_page, render_frame_host); |
| 605 | |
| 606 // TODO(clamy): Remove this once enough data has been gathered for | |
| 607 // crbug.com/589365. | |
| 608 render_frame_host->navigation_handle()->set_is_in_commit(false); | |
| 609 | |
| 605 render_frame_host->SetNavigationHandle(nullptr); | 610 render_frame_host->SetNavigationHandle(nullptr); |
| 606 } | 611 } |
| 607 | 612 |
| 613 // TODO(clamy): The NavigationHandle should always be reset here. | |
|
nasko
2016/03/15 14:10:34
Why not add a CHECK to verify this?
clamy
2016/03/15 14:16:16
Because I know for a fact that this isn't the case
| |
| 614 | |
| 608 if (!did_navigate) | 615 if (!did_navigate) |
| 609 return; // No navigation happened. | 616 return; // No navigation happened. |
| 610 | 617 |
| 611 // DO NOT ADD MORE STUFF TO THIS FUNCTION! Your component should either listen | 618 // DO NOT ADD MORE STUFF TO THIS FUNCTION! Your component should either listen |
| 612 // for the appropriate notification (best) or you can add it to | 619 // for the appropriate notification (best) or you can add it to |
| 613 // DidNavigateMainFramePostCommit / DidNavigateAnyFramePostCommit (only if | 620 // DidNavigateMainFramePostCommit / DidNavigateAnyFramePostCommit (only if |
| 614 // necessary, please). | 621 // necessary, please). |
| 615 | 622 |
| 616 // TODO(carlosk): Move this out when PlzNavigate implementation properly calls | 623 // TODO(carlosk): Move this out when PlzNavigate implementation properly calls |
| 617 // the observer methods. | 624 // the observer methods. |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1115 entry->set_should_replace_entry(pending_entry->should_replace_entry()); | 1122 entry->set_should_replace_entry(pending_entry->should_replace_entry()); |
| 1116 entry->SetRedirectChain(pending_entry->GetRedirectChain()); | 1123 entry->SetRedirectChain(pending_entry->GetRedirectChain()); |
| 1117 } | 1124 } |
| 1118 controller_->SetPendingEntry(std::move(entry)); | 1125 controller_->SetPendingEntry(std::move(entry)); |
| 1119 if (delegate_) | 1126 if (delegate_) |
| 1120 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1127 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1121 } | 1128 } |
| 1122 } | 1129 } |
| 1123 | 1130 |
| 1124 } // namespace content | 1131 } // namespace content |
| OLD | NEW |