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/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 871 details->http_status_code = params.http_status_code; | 871 details->http_status_code = params.http_status_code; |
| 872 NotifyNavigationEntryCommitted(details); | 872 NotifyNavigationEntryCommitted(details); |
| 873 | 873 |
| 874 return true; | 874 return true; |
| 875 } | 875 } |
| 876 | 876 |
| 877 NavigationType NavigationControllerImpl::ClassifyNavigation( | 877 NavigationType NavigationControllerImpl::ClassifyNavigation( |
| 878 RenderFrameHost* rfh, | 878 RenderFrameHost* rfh, |
| 879 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const { | 879 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const { |
| 880 if (params.page_id == -1) { | 880 if (params.page_id == -1) { |
| 881 // FIXME (nasko, creis): An out-of-process child frame has no way of | |
|
Charlie Reis
2014/07/24 22:36:29
We use TODO(...) rather than FIXME in the Chrome r
kenrb
2014/07/25 23:42:05
Fixed.
| |
| 882 // knowing the page_id of its parent, so it is passing back -1. The | |
| 883 // semantics here should be re-evaluated during session history refactor. | |
|
Charlie Reis
2014/07/24 22:36:29
Can you add a mention of http://crbug.com/236848 t
kenrb
2014/07/25 23:42:05
Done.
| |
| 884 // For now, we assume this means the child frame loaded and proceed. | |
|
Charlie Reis
2014/07/24 22:36:29
"Note that this may do the wrong thing for cross-p
kenrb
2014/07/25 23:42:05
Done.
| |
| 885 if (rfh->IsCrossProcessSubframe()) | |
| 886 return NAVIGATION_TYPE_NEW_SUBFRAME; | |
| 887 | |
| 881 // The renderer generates the page IDs, and so if it gives us the invalid | 888 // The renderer generates the page IDs, and so if it gives us the invalid |
| 882 // page ID (-1) we know it didn't actually navigate. This happens in a few | 889 // page ID (-1) we know it didn't actually navigate. This happens in a few |
| 883 // cases: | 890 // cases: |
| 884 // | 891 // |
| 885 // - If a page makes a popup navigated to about blank, and then writes | 892 // - If a page makes a popup navigated to about blank, and then writes |
| 886 // stuff like a subframe navigated to a real page. We'll get the commit | 893 // stuff like a subframe navigated to a real page. We'll get the commit |
| 887 // for the subframe, but there won't be any commit for the outer page. | 894 // for the subframe, but there won't be any commit for the outer page. |
| 888 // | 895 // |
| 889 // - We were also getting these for failed loads (for example, bug 21849). | 896 // - We were also getting these for failed loads (for example, bug 21849). |
| 890 // The guess is that we get a "load commit" for the alternate error page, | 897 // The guess is that we get a "load commit" for the alternate error page, |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1782 } | 1789 } |
| 1783 } | 1790 } |
| 1784 } | 1791 } |
| 1785 | 1792 |
| 1786 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1793 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 1787 const base::Callback<base::Time()>& get_timestamp_callback) { | 1794 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 1788 get_timestamp_callback_ = get_timestamp_callback; | 1795 get_timestamp_callback_ = get_timestamp_callback; |
| 1789 } | 1796 } |
| 1790 | 1797 |
| 1791 } // namespace content | 1798 } // namespace content |
| OLD | NEW |