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

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

Issue 1849343004: Remove RenderFrameHostImplState and convert it to boolean. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits. Created 4 years, 8 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/browser/frame_host/navigator_impl_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_controller_impl.h" 5 #include "content/browser/frame_host/navigation_controller_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 } 628 }
629 629
630 private: 630 private:
631 void RenderFrameCreated(RenderFrameHost* render_frame_host) override { 631 void RenderFrameCreated(RenderFrameHost* render_frame_host) override {
632 RenderFrameHostImpl* rfh = 632 RenderFrameHostImpl* rfh =
633 static_cast<RenderFrameHostImpl*>(render_frame_host); 633 static_cast<RenderFrameHostImpl*>(render_frame_host);
634 634
635 // Don't pay attention to swapped out RenderFrameHosts in the main frame. 635 // Don't pay attention to swapped out RenderFrameHosts in the main frame.
636 // TODO(nasko): Remove once swappedout:// is gone. 636 // TODO(nasko): Remove once swappedout:// is gone.
637 // See https://crbug.com/357747. 637 // See https://crbug.com/357747.
638 if (!RenderFrameHostImpl::IsRFHStateActive(rfh->rfh_state())) { 638 if (!rfh->is_active()) {
639 DLOG(INFO) << "Skipping swapped out RFH: " 639 DLOG(INFO) << "Skipping swapped out RFH: "
640 << rfh->GetSiteInstance()->GetSiteURL(); 640 << rfh->GetSiteInstance()->GetSiteURL();
641 return; 641 return;
642 } 642 }
643 643
644 // If this object was not created with a specified frame tree node, then use 644 // If this object was not created with a specified frame tree node, then use
645 // the first created active RenderFrameHost. Once a node is selected, there 645 // the first created active RenderFrameHost. Once a node is selected, there
646 // shouldn't be any other frames being created. 646 // shouldn't be any other frames being created.
647 int frame_tree_node_id = rfh->frame_tree_node()->frame_tree_node_id(); 647 int frame_tree_node_id = rfh->frame_tree_node()->frame_tree_node_id();
648 DCHECK(frame_tree_node_id_ == 0 || 648 DCHECK(frame_tree_node_id_ == 0 ||
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
3514 observer.Wait(); 3514 observer.Wait();
3515 3515
3516 EXPECT_EQ(3, controller.GetEntryCount()); 3516 EXPECT_EQ(3, controller.GetEntryCount());
3517 EXPECT_EQ(3, RendererHistoryLength(shell())); 3517 EXPECT_EQ(3, RendererHistoryLength(shell()));
3518 EXPECT_EQ(0, controller.GetLastCommittedEntryIndex()); 3518 EXPECT_EQ(0, controller.GetLastCommittedEntryIndex());
3519 3519
3520 EXPECT_EQ(frame_url_1, frame->current_url()); 3520 EXPECT_EQ(frame_url_1, frame->current_url());
3521 } 3521 }
3522 3522
3523 } // namespace content 3523 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698