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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 // False in the single-process mode, as it makes RVHs to accumulate | 847 // False in the single-process mode, as it makes RVHs to accumulate |
848 // in swapped_out_hosts_. | 848 // in swapped_out_hosts_. |
849 // True if we are using process-per-site-instance (default) or | 849 // True if we are using process-per-site-instance (default) or |
850 // process-per-site (kProcessPerSite). | 850 // process-per-site (kProcessPerSite). |
851 // True for --site-per-process, which overrides both kSingleProcess and | |
Charlie Reis
2015/02/05 17:57:53
nit: Let's move this block above the first comment
alexmos
2015/02/05 18:01:11
Done.
| |
852 // kProcessPerTab. | |
853 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
854 switches::kSitePerProcess)) | |
855 return true; | |
851 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 856 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
852 switches::kSingleProcess) && | 857 switches::kSingleProcess) && |
853 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 858 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
854 switches::kProcessPerTab); | 859 switches::kProcessPerTab); |
855 } | 860 } |
856 | 861 |
857 bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( | 862 bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( |
858 const GURL& current_effective_url, | 863 const GURL& current_effective_url, |
859 bool current_is_view_source_mode, | 864 bool current_is_view_source_mode, |
860 SiteInstance* new_site_instance, | 865 SiteInstance* new_site_instance, |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1933 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 1938 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
1934 SiteInstance* instance) { | 1939 SiteInstance* instance) { |
1935 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 1940 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
1936 if (iter != proxy_hosts_.end()) { | 1941 if (iter != proxy_hosts_.end()) { |
1937 delete iter->second; | 1942 delete iter->second; |
1938 proxy_hosts_.erase(iter); | 1943 proxy_hosts_.erase(iter); |
1939 } | 1944 } |
1940 } | 1945 } |
1941 | 1946 |
1942 } // namespace content | 1947 } // namespace content |
OLD | NEW |