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

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

Issue 1421483005: Reland: Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 NavigationEntryImpl::TreeNode* NavigationEntryImpl::FindFrameEntry( 595 NavigationEntryImpl::TreeNode* NavigationEntryImpl::FindFrameEntry(
596 FrameTreeNode* frame_tree_node) const { 596 FrameTreeNode* frame_tree_node) const {
597 NavigationEntryImpl::TreeNode* node = nullptr; 597 NavigationEntryImpl::TreeNode* node = nullptr;
598 std::queue<NavigationEntryImpl::TreeNode*> work_queue; 598 std::queue<NavigationEntryImpl::TreeNode*> work_queue;
599 work_queue.push(root_node()); 599 work_queue.push(root_node());
600 while (!work_queue.empty()) { 600 while (!work_queue.empty()) {
601 node = work_queue.front(); 601 node = work_queue.front();
602 work_queue.pop(); 602 work_queue.pop();
603 if (node->MatchesFrame(frame_tree_node)) { 603 if (node->MatchesFrame(frame_tree_node)) {
604 // Only the root TreeNode should have a FTN ID of -1. 604 // Only the root TreeNode should have a FTN ID of -1.
605 DCHECK_IMPLIES(node->frame_entry->frame_tree_node_id() == -1, 605 DCHECK(node->frame_entry->frame_tree_node_id() != -1 ||
606 node == root_node()); 606 node == root_node());
607 return node; 607 return node;
608 } 608 }
609 // Enqueue any children and keep looking. 609 // Enqueue any children and keep looking.
610 for (auto& child : node->children) 610 for (auto& child : node->children)
611 work_queue.push(child); 611 work_queue.push(child);
612 } 612 }
613 return nullptr; 613 return nullptr;
614 } 614 }
615 615
616 } // namespace content 616 } // namespace content
OLDNEW
« no previous file with comments | « components/tracing/child_memory_dump_manager_delegate_impl.h ('k') | content/browser/frame_host/navigation_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698