OLD | NEW |
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/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 FrameTreeNode* node) { | 837 FrameTreeNode* node) { |
838 RenderFrameProxyHostMap::iterator iter = | 838 RenderFrameProxyHostMap::iterator iter = |
839 node->render_manager()->proxy_hosts_.find(site_instance_id); | 839 node->render_manager()->proxy_hosts_.find(site_instance_id); |
840 if (iter != node->render_manager()->proxy_hosts_.end()) | 840 if (iter != node->render_manager()->proxy_hosts_.end()) |
841 iter->second->set_render_frame_proxy_created(false); | 841 iter->second->set_render_frame_proxy_created(false); |
842 | 842 |
843 return true; | 843 return true; |
844 } | 844 } |
845 | 845 |
846 bool RenderFrameHostManager::ShouldTransitionCrossSite() { | 846 bool RenderFrameHostManager::ShouldTransitionCrossSite() { |
| 847 // True for --site-per-process, which overrides both kSingleProcess and |
| 848 // kProcessPerTab. |
| 849 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 850 switches::kSitePerProcess)) |
| 851 return true; |
| 852 |
847 // False in the single-process mode, as it makes RVHs to accumulate | 853 // False in the single-process mode, as it makes RVHs to accumulate |
848 // in swapped_out_hosts_. | 854 // in swapped_out_hosts_. |
849 // True if we are using process-per-site-instance (default) or | 855 // True if we are using process-per-site-instance (default) or |
850 // process-per-site (kProcessPerSite). | 856 // process-per-site (kProcessPerSite). |
851 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 857 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
852 switches::kSingleProcess) && | 858 switches::kSingleProcess) && |
853 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 859 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
854 switches::kProcessPerTab); | 860 switches::kProcessPerTab); |
855 } | 861 } |
856 | 862 |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1933 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 1939 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
1934 SiteInstance* instance) { | 1940 SiteInstance* instance) { |
1935 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 1941 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
1936 if (iter != proxy_hosts_.end()) { | 1942 if (iter != proxy_hosts_.end()) { |
1937 delete iter->second; | 1943 delete iter->second; |
1938 proxy_hosts_.erase(iter); | 1944 proxy_hosts_.erase(iter); |
1939 } | 1945 } |
1940 } | 1946 } |
1941 | 1947 |
1942 } // namespace content | 1948 } // namespace content |
OLD | NEW |