OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 ChromeSigninClient* signin_client = | 1188 ChromeSigninClient* signin_client = |
1189 ChromeSigninClientFactory::GetForProfile(profile); | 1189 ChromeSigninClientFactory::GetForProfile(profile); |
1190 if (signin_client && signin_client->IsSigninProcess(process_host->GetID())) | 1190 if (signin_client && signin_client->IsSigninProcess(process_host->GetID())) |
1191 return SigninManager::IsWebBasedSigninFlowURL(site_url); | 1191 return SigninManager::IsWebBasedSigninFlowURL(site_url); |
1192 #endif | 1192 #endif |
1193 | 1193 |
1194 ExtensionService* service = | 1194 ExtensionService* service = |
1195 extensions::ExtensionSystem::Get(profile)->extension_service(); | 1195 extensions::ExtensionSystem::Get(profile)->extension_service(); |
1196 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); | 1196 extensions::ProcessMap* process_map = extensions::ProcessMap::Get(profile); |
1197 | 1197 |
1198 // Don't allow the Task Manager to share a process with anything else. | |
1199 // Otherwise it can affect the renderers it is observing. | |
1200 // Note: we could create another RenderProcessHostPrivilege bucket for | |
1201 // this to allow multiple chrome://tasks instances to share, but that's | |
1202 // a very unlikely case without serious consequences. | |
1203 if (site_url.GetOrigin() == GURL(chrome::kChromeUITaskManagerURL).GetOrigin()) | |
1204 return false; | |
1205 | |
1206 // These may be NULL during tests. In that case, just assume any site can | 1198 // These may be NULL during tests. In that case, just assume any site can |
1207 // share any host. | 1199 // share any host. |
1208 if (!service || !process_map) | 1200 if (!service || !process_map) |
1209 return true; | 1201 return true; |
1210 | 1202 |
1211 // Otherwise, just make sure the process privilege matches the privilege | 1203 // Otherwise, just make sure the process privilege matches the privilege |
1212 // required by the site. | 1204 // required by the site. |
1213 RenderProcessHostPrivilege privilege_required = | 1205 RenderProcessHostPrivilege privilege_required = |
1214 GetPrivilegeRequiredByUrl(site_url, service); | 1206 GetPrivilegeRequiredByUrl(site_url, service); |
1215 return GetProcessPrivilege(process_host, process_map, service) == | 1207 return GetProcessPrivilege(process_host, process_map, service) == |
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2752 switches::kDisableWebRtcEncryption, | 2744 switches::kDisableWebRtcEncryption, |
2753 }; | 2745 }; |
2754 to_command_line->CopySwitchesFrom(from_command_line, | 2746 to_command_line->CopySwitchesFrom(from_command_line, |
2755 kWebRtcDevSwitchNames, | 2747 kWebRtcDevSwitchNames, |
2756 arraysize(kWebRtcDevSwitchNames)); | 2748 arraysize(kWebRtcDevSwitchNames)); |
2757 } | 2749 } |
2758 } | 2750 } |
2759 #endif // defined(ENABLE_WEBRTC) | 2751 #endif // defined(ENABLE_WEBRTC) |
2760 | 2752 |
2761 } // namespace chrome | 2753 } // namespace chrome |
OLD | NEW |