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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 551443002: Keep a copy of page id in RenderViewHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/common/frame_messages.h ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 // If the history list is valid, our list of page IDs should be correct. 2223 // If the history list is valid, our list of page IDs should be correct.
2224 DCHECK(render_view_->history_list_length_ <= 0 || 2224 DCHECK(render_view_->history_list_length_ <= 0 ||
2225 render_view_->history_list_offset_ < 0 || 2225 render_view_->history_list_offset_ < 0 ||
2226 render_view_->history_list_offset_ >= 2226 render_view_->history_list_offset_ >=
2227 render_view_->history_list_length_ || 2227 render_view_->history_list_length_ ||
2228 render_view_->history_page_ids_[render_view_->history_list_offset_] 2228 render_view_->history_page_ids_[render_view_->history_list_offset_]
2229 == render_view_->page_id_); 2229 == render_view_->page_id_);
2230 } 2230 }
2231 } 2231 }
2232 2232
2233 Send(new FrameHostMsg_DidAssignPageId(routing_id_, render_view_->page_id_));
Charlie Reis 2014/09/08 16:04:37 This part looks new to me, but I think it makes se
Avi (use Gerrit) 2014/09/08 16:40:48 Yes, this is new. There is so much uncertainty abo
Charlie Reis 2014/09/08 16:51:00 I tossed in a NOTREACHED in the else block and the
Avi (use Gerrit) 2014/09/08 17:02:09 It would indeed be good to know what's going on. D
Charlie Reis 2014/09/08 17:28:53 I took a closer look, and we get there for this co
2234
2233 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers_, 2235 FOR_EACH_OBSERVER(RenderViewObserver, render_view_->observers_,
2234 DidCommitProvisionalLoad(frame, is_new_navigation)); 2236 DidCommitProvisionalLoad(frame, is_new_navigation));
2235 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, 2237 FOR_EACH_OBSERVER(RenderFrameObserver, observers_,
2236 DidCommitProvisionalLoad(is_new_navigation)); 2238 DidCommitProvisionalLoad(is_new_navigation));
2237 2239
2238 if (!frame->parent()) { // Only for top frames. 2240 if (!frame->parent()) { // Only for top frames.
2239 RenderThreadImpl* render_thread_impl = RenderThreadImpl::current(); 2241 RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
2240 if (render_thread_impl) { // Can be NULL in tests. 2242 if (render_thread_impl) { // Can be NULL in tests.
2241 render_thread_impl->histogram_customizer()-> 2243 render_thread_impl->histogram_customizer()->
2242 RenderViewNavigatedToHost(GURL(GetLoadingUrl()).host(), 2244 RenderViewNavigatedToHost(GURL(GetLoadingUrl()).host(),
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
3875 3877
3876 #if defined(ENABLE_BROWSER_CDMS) 3878 #if defined(ENABLE_BROWSER_CDMS)
3877 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3879 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3878 if (!cdm_manager_) 3880 if (!cdm_manager_)
3879 cdm_manager_ = new RendererCdmManager(this); 3881 cdm_manager_ = new RendererCdmManager(this);
3880 return cdm_manager_; 3882 return cdm_manager_;
3881 } 3883 }
3882 #endif // defined(ENABLE_BROWSER_CDMS) 3884 #endif // defined(ENABLE_BROWSER_CDMS)
3883 3885
3884 } // namespace content 3886 } // namespace content
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698