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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index dde92eeec1c2083a2de9320cf16126f3a975cc90..d253d5f8d284452263e098f229c58576c1bb2764 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -248,7 +248,7 @@
void NavigationHandleImpl::DidCommitNavigation(
bool same_page,
RenderFrameHostImpl* render_frame_host) {
- CHECK(!render_frame_host_ || render_frame_host_ == render_frame_host);
+ CHECK_IMPLIES(render_frame_host_, render_frame_host_ == render_frame_host);
is_same_page_ = same_page;
render_frame_host_ = render_frame_host;
state_ = net_error_code_ == net::OK ? DID_COMMIT : DID_COMMIT_ERROR_PAGE;
@@ -257,8 +257,8 @@
NavigationThrottle::ThrottleCheckResult
NavigationHandleImpl::CheckWillStartRequest() {
DCHECK(state_ == WILL_SEND_REQUEST || state_ == DEFERRING_START);
- DCHECK(state_ != WILL_SEND_REQUEST || next_index_ == 0);
- DCHECK(state_ != DEFERRING_START || next_index_ != 0);
+ DCHECK_IMPLIES(state_ == WILL_SEND_REQUEST, next_index_ == 0);
+ DCHECK_IMPLIES(state_ == DEFERRING_START, next_index_ != 0);
for (size_t i = next_index_; i < throttles_.size(); ++i) {
NavigationThrottle::ThrottleCheckResult result =
throttles_[i]->WillStartRequest();
@@ -286,8 +286,8 @@
NavigationThrottle::ThrottleCheckResult
NavigationHandleImpl::CheckWillRedirectRequest() {
DCHECK(state_ == WILL_REDIRECT_REQUEST || state_ == DEFERRING_REDIRECT);
- DCHECK(state_ != WILL_REDIRECT_REQUEST || next_index_ == 0);
- DCHECK(state_ != DEFERRING_REDIRECT || next_index_ != 0);
+ DCHECK_IMPLIES(state_ == WILL_REDIRECT_REQUEST, next_index_ == 0);
+ DCHECK_IMPLIES(state_ == DEFERRING_REDIRECT, next_index_ != 0);
for (size_t i = next_index_; i < throttles_.size(); ++i) {
NavigationThrottle::ThrottleCheckResult result =
throttles_[i]->WillRedirectRequest();
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.cc ('k') | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698