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

Unified Diff: content/test/content_browser_test_utils_internal.cc

Issue 1245903004: Switch RenderFrameHostManager to use RenderProcessHostObserver, remove NOTIFICATION_RENDERER_PROCES… (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 side-by-side diff with in-line comments
Download patch
Index: content/test/content_browser_test_utils_internal.cc
diff --git a/content/test/content_browser_test_utils_internal.cc b/content/test/content_browser_test_utils_internal.cc
index ea1d17ebce72a4954d21d6112dec0270f3acb683..8bbc04b30e6b4b6ed860886ae89a8d55eb5dd574 100644
--- a/content/test/content_browser_test_utils_internal.cc
+++ b/content/test/content_browser_test_utils_internal.cc
@@ -84,10 +84,8 @@ std::string FrameTreeVisualizer::DepictFrameTree(FrameTreeNode* root) {
}
// Sort the proxies by SiteInstance ID to avoid hash_map ordering.
- std::map<int, RenderFrameProxyHost*> sorted_proxy_hosts;
- for (auto& proxy_pair : node->render_manager()->proxy_hosts_) {
- sorted_proxy_hosts.insert(proxy_pair);
- }
+ std::map<int, RenderFrameProxyHost*> sorted_proxy_hosts =
+ node->render_manager()->GetAllProxyHostsForTesting();
for (auto& proxy_pair : sorted_proxy_hosts) {
RenderFrameProxyHost* proxy = proxy_pair.second;
legend[GetName(proxy->GetSiteInstance())] = proxy->GetSiteInstance();
@@ -155,7 +153,9 @@ std::string FrameTreeVisualizer::DepictFrameTree(FrameTreeNode* root) {
}
// Show the SiteInstances of the RenderFrameProxyHosts of this node.
- if (!node->render_manager()->proxy_hosts_.empty()) {
+ std::map<int, RenderFrameProxyHost*> sorted_proxy_host_map =
+ node->render_manager()->GetAllProxyHostsForTesting();
+ if (!sorted_proxy_host_map.empty()) {
// Show a dashed line of variable length before the proxy list. Always at
// least two dashes.
line.append(" --");
@@ -174,7 +174,7 @@ std::string FrameTreeVisualizer::DepictFrameTree(FrameTreeNode* root) {
// Sort these alphabetically, to avoid hash_map ordering dependency.
std::vector<std::string> sorted_proxy_hosts;
- for (auto& proxy_pair : node->render_manager()->proxy_hosts_) {
+ for (auto& proxy_pair : sorted_proxy_host_map) {
sorted_proxy_hosts.push_back(
GetName(proxy_pair.second->GetSiteInstance()));
}

Powered by Google App Engine
This is Rietveld 408576698