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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.h

Issue 1608743004: Switch RenderFrameHost pending deletion list to use scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/render_frame_host_manager.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 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 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // RenderFrameHost may be discarded before a new RenderFrameHost is created 747 // RenderFrameHost may be discarded before a new RenderFrameHost is created
748 // for the navigation. 748 // for the navigation.
749 // PlzNavigate: this will never be set since there are no transferring 749 // PlzNavigate: this will never be set since there are no transferring
750 // navigations in PlzNavigate. 750 // navigations in PlzNavigate.
751 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_; 751 scoped_ptr<NavigationHandleImpl> transfer_navigation_handle_;
752 752
753 // Proxy hosts, indexed by site instance ID. 753 // Proxy hosts, indexed by site instance ID.
754 base::ScopedPtrHashMap<int32_t, scoped_ptr<RenderFrameProxyHost>> 754 base::ScopedPtrHashMap<int32_t, scoped_ptr<RenderFrameProxyHost>>
755 proxy_hosts_; 755 proxy_hosts_;
756 756
757 // A list of RenderFrameHosts waiting to shut down after swapping out. We use 757 // A list of RenderFrameHosts waiting to shut down after swapping out.
758 // a linked list since we expect frequent deletes and no indexed access, and 758 using RFHPendingDeleteList = std::list<scoped_ptr<RenderFrameHostImpl>>;
dcheng 2016/01/20 08:55:20 Note: I could use std::set, but that still doesn't
Charlie Reis 2016/01/20 22:03:23 No, this seems fine.
759 // because sets don't appear to support linked_ptrs.
760 typedef std::list<linked_ptr<RenderFrameHostImpl> > RFHPendingDeleteList;
761 RFHPendingDeleteList pending_delete_hosts_; 759 RFHPendingDeleteList pending_delete_hosts_;
762 760
763 // The intersitial page currently shown if any, not own by this class 761 // The intersitial page currently shown if any, not own by this class
764 // (the InterstitialPage is self-owned, it deletes itself when hidden). 762 // (the InterstitialPage is self-owned, it deletes itself when hidden).
765 InterstitialPageImpl* interstitial_page_; 763 InterstitialPageImpl* interstitial_page_;
766 764
767 // PlzNavigate 765 // PlzNavigate
768 // Stores a speculative RenderFrameHost which is created early in a navigation 766 // Stores a speculative RenderFrameHost which is created early in a navigation
769 // so a renderer process can be started in parallel, if needed. 767 // so a renderer process can be started in parallel, if needed.
770 // This is purely a performance optimization and is not required for correct 768 // This is purely a performance optimization and is not required for correct
771 // behavior. The speculative RenderFrameHost might be discarded later on if 769 // behavior. The speculative RenderFrameHost might be discarded later on if
772 // the final URL's SiteInstance isn't compatible with the one used to create 770 // the final URL's SiteInstance isn't compatible with the one used to create
773 // it. 771 // it.
774 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the 772 // Note: PlzNavigate only uses the speculative RenderFrameHost, not the
775 // pending one. 773 // pending one.
776 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_; 774 scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_;
777 775
778 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 776 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
779 777
780 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 778 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
781 }; 779 };
782 780
783 } // namespace content 781 } // namespace content
784 782
785 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 783 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698