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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 return true; | 937 return true; |
938 | 938 |
939 #if defined(ENABLE_EXTENSIONS) | 939 #if defined(ENABLE_EXTENSIONS) |
940 return ChromeContentBrowserClientExtensionsPart::ShouldUseProcessPerSite( | 940 return ChromeContentBrowserClientExtensionsPart::ShouldUseProcessPerSite( |
941 profile, effective_url); | 941 profile, effective_url); |
942 #else | 942 #else |
943 return false; | 943 return false; |
944 #endif | 944 #endif |
945 } | 945 } |
946 | 946 |
| 947 bool ChromeContentBrowserClient::DoesSiteRequireDedicatedProcess( |
| 948 content::BrowserContext* browser_context, |
| 949 const GURL& effective_site_url) { |
| 950 #if defined(ENABLE_EXTENSIONS) |
| 951 if (ChromeContentBrowserClientExtensionsPart::DoesSiteRequireDedicatedProcess( |
| 952 browser_context, effective_site_url)) { |
| 953 return true; |
| 954 } |
| 955 #endif |
| 956 return false; |
| 957 } |
| 958 |
947 // TODO(creis, nick): https://crbug.com/160576 describes a weakness in our | 959 // TODO(creis, nick): https://crbug.com/160576 describes a weakness in our |
948 // origin-lock enforcement, where we don't have a way to efficiently know | 960 // origin-lock enforcement, where we don't have a way to efficiently know |
949 // effective URLs on the IO thread, and wind up killing processes that e.g. | 961 // effective URLs on the IO thread, and wind up killing processes that e.g. |
950 // request cookies for their actual URL. This whole function (and its | 962 // request cookies for their actual URL. This whole function (and its |
951 // ExtensionsPart) should be removed once we add that ability to the IO thread. | 963 // ExtensionsPart) should be removed once we add that ability to the IO thread. |
952 bool ChromeContentBrowserClient::ShouldLockToOrigin( | 964 bool ChromeContentBrowserClient::ShouldLockToOrigin( |
953 content::BrowserContext* browser_context, | 965 content::BrowserContext* browser_context, |
954 const GURL& effective_site_url) { | 966 const GURL& effective_site_url) { |
955 // Origin lock to the search scheme would kill processes upon legitimate | 967 // Origin lock to the search scheme would kill processes upon legitimate |
956 // requests for cookies from the search engine's domain. | 968 // requests for cookies from the search engine's domain. |
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2707 if (channel <= kMaxDisableEncryptionChannel) { | 2719 if (channel <= kMaxDisableEncryptionChannel) { |
2708 static const char* const kWebRtcDevSwitchNames[] = { | 2720 static const char* const kWebRtcDevSwitchNames[] = { |
2709 switches::kDisableWebRtcEncryption, | 2721 switches::kDisableWebRtcEncryption, |
2710 }; | 2722 }; |
2711 to_command_line->CopySwitchesFrom(from_command_line, | 2723 to_command_line->CopySwitchesFrom(from_command_line, |
2712 kWebRtcDevSwitchNames, | 2724 kWebRtcDevSwitchNames, |
2713 arraysize(kWebRtcDevSwitchNames)); | 2725 arraysize(kWebRtcDevSwitchNames)); |
2714 } | 2726 } |
2715 } | 2727 } |
2716 #endif // defined(ENABLE_WEBRTC) | 2728 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |