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

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

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/browser/frame_host/navigation_entry_impl.h" 5 #include "content/browser/frame_host/navigation_entry_impl.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 NavigationEntryImpl::TreeNode* NavigationEntryImpl::FindFrameEntry( 580 NavigationEntryImpl::TreeNode* NavigationEntryImpl::FindFrameEntry(
581 FrameTreeNode* frame_tree_node) const { 581 FrameTreeNode* frame_tree_node) const {
582 NavigationEntryImpl::TreeNode* node = nullptr; 582 NavigationEntryImpl::TreeNode* node = nullptr;
583 std::queue<NavigationEntryImpl::TreeNode*> work_queue; 583 std::queue<NavigationEntryImpl::TreeNode*> work_queue;
584 work_queue.push(root_node()); 584 work_queue.push(root_node());
585 while (!work_queue.empty()) { 585 while (!work_queue.empty()) {
586 node = work_queue.front(); 586 node = work_queue.front();
587 work_queue.pop(); 587 work_queue.pop();
588 if (node->MatchesFrame(frame_tree_node)) { 588 if (node->MatchesFrame(frame_tree_node)) {
589 // Only the root TreeNode should have a FTN ID of -1. 589 // Only the root TreeNode should have a FTN ID of -1.
590 DCHECK_IMPLIES(node->frame_entry->frame_tree_node_id() == -1, 590 DCHECK(node->frame_entry->frame_tree_node_id() != -1 ||
591 node == root_node()); 591 node == root_node());
592 return node; 592 return node;
593 } 593 }
594 // Enqueue any children and keep looking. 594 // Enqueue any children and keep looking.
595 for (auto& child : node->children) 595 for (auto& child : node->children)
596 work_queue.push(child); 596 work_queue.push(child);
597 } 597 }
598 return nullptr; 598 return nullptr;
599 } 599 }
600 600
601 } // namespace content 601 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_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