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

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

Issue 2097083002: Update the CHECK in 'NavigationHandleImpl::GetRenderFrameHost()' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nasko@ Created 4 years, 5 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 | « no previous file | content/public/browser/navigation_handle.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_handle_impl.h" 5 #include "content/browser/frame_host/navigation_handle_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/frame_host/frame_tree_node.h" 10 #include "content/browser/frame_host/frame_tree_node.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 CHECK_NE(INITIAL, state_) 176 CHECK_NE(INITIAL, state_)
177 << "This accessor should not be called before the request is started."; 177 << "This accessor should not be called before the request is started.";
178 return is_external_protocol_; 178 return is_external_protocol_;
179 } 179 }
180 180
181 net::Error NavigationHandleImpl::GetNetErrorCode() { 181 net::Error NavigationHandleImpl::GetNetErrorCode() {
182 return net_error_code_; 182 return net_error_code_;
183 } 183 }
184 184
185 RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { 185 RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() {
186 CHECK(state_ >= READY_TO_COMMIT) 186 // TODO(mkwst): Change this to check against 'READY_TO_COMMIT' once
187 << "This accessor should only be called " 187 // ReadyToCommitNavigation is available whether or not PlzNavigate is
188 "after the navigation is ready to commit."; 188 // enabled. https://crbug.com/621856
189 CHECK_GE(state_, WILL_PROCESS_RESPONSE)
190 << "This accessor should only be called after a response has been "
191 "delivered for processing.";
189 return render_frame_host_; 192 return render_frame_host_;
190 } 193 }
191 194
192 bool NavigationHandleImpl::IsSamePage() { 195 bool NavigationHandleImpl::IsSamePage() {
193 DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE) 196 DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE)
194 << "This accessor should not be called before the navigation has " 197 << "This accessor should not be called before the navigation has "
195 "committed."; 198 "committed.";
196 return is_same_page_; 199 return is_same_page_;
197 } 200 }
198 201
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 complete_callback_.Reset(); 535 complete_callback_.Reset();
533 536
534 if (!callback.is_null()) 537 if (!callback.is_null())
535 callback.Run(result); 538 callback.Run(result);
536 539
537 // No code after running the callback, as it might have resulted in our 540 // No code after running the callback, as it might have resulted in our
538 // destruction. 541 // destruction.
539 } 542 }
540 543
541 } // namespace content 544 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/browser/navigation_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698