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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2696 // There is now no forward history. | 2696 // There is now no forward history. |
2697 render_view_->history_list_offset_++; | 2697 render_view_->history_list_offset_++; |
2698 if (render_view_->history_list_offset_ >= kMaxSessionHistoryEntries) | 2698 if (render_view_->history_list_offset_ >= kMaxSessionHistoryEntries) |
2699 render_view_->history_list_offset_ = kMaxSessionHistoryEntries - 1; | 2699 render_view_->history_list_offset_ = kMaxSessionHistoryEntries - 1; |
2700 render_view_->history_list_length_ = | 2700 render_view_->history_list_length_ = |
2701 render_view_->history_list_offset_ + 1; | 2701 render_view_->history_list_offset_ + 1; |
2702 } | 2702 } |
2703 } else { | 2703 } else { |
2704 const RequestNavigationParams& request_params = | 2704 const RequestNavigationParams& request_params = |
2705 navigation_state->request_params(); | 2705 navigation_state->request_params(); |
2706 if (request_params.page_id != -1) { | 2706 if (request_params.nav_entry_id != 0 && |
| 2707 !request_params.intended_as_new_entry) { |
2707 // This is a successful session history navigation! | 2708 // This is a successful session history navigation! |
2708 render_view_->page_id_ = request_params.page_id; | 2709 render_view_->page_id_ = request_params.page_id; |
2709 | 2710 |
2710 render_view_->history_list_offset_ = | 2711 render_view_->history_list_offset_ = |
2711 request_params.pending_history_list_offset; | 2712 request_params.pending_history_list_offset; |
2712 } | 2713 } |
2713 // Page id is going away (http://crbug.com/369661); ensure that a | |
2714 // replacement that doesn't use page id is equivalent in all cases. | |
2715 CHECK_EQ(request_params.page_id != -1, | |
2716 request_params.nav_entry_id != 0 && | |
2717 !request_params.intended_as_new_entry); | |
2718 } | 2714 } |
2719 | 2715 |
2720 bool sent = Send( | 2716 bool sent = Send( |
2721 new FrameHostMsg_DidAssignPageId(routing_id_, render_view_->page_id_)); | 2717 new FrameHostMsg_DidAssignPageId(routing_id_, render_view_->page_id_)); |
2722 CHECK(sent); // http://crbug.com/407376 | 2718 CHECK(sent); // http://crbug.com/407376 |
2723 | 2719 |
2724 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers_, | 2720 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers_, |
2725 DidCommitProvisionalLoad(frame, is_new_navigation)); | 2721 DidCommitProvisionalLoad(frame, is_new_navigation)); |
2726 FOR_EACH_OBSERVER( | 2722 FOR_EACH_OBSERVER( |
2727 RenderFrameObserver, observers_, | 2723 RenderFrameObserver, observers_, |
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4967 #elif defined(ENABLE_BROWSER_CDMS) | 4963 #elif defined(ENABLE_BROWSER_CDMS) |
4968 cdm_manager_, | 4964 cdm_manager_, |
4969 #endif | 4965 #endif |
4970 this); | 4966 this); |
4971 } | 4967 } |
4972 | 4968 |
4973 return cdm_factory_; | 4969 return cdm_factory_; |
4974 } | 4970 } |
4975 | 4971 |
4976 } // namespace content | 4972 } // namespace content |
OLD | NEW |