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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1046 GURL from_url = site_instance->GetSiteURL(); | 1046 GURL from_url = site_instance->GetSiteURL(); |
1047 | 1047 |
1048 #if defined(ENABLE_EXTENSIONS) | 1048 #if defined(ENABLE_EXTENSIONS) |
1049 bool result; | 1049 bool result; |
1050 if (ChromeContentBrowserClientExtensionsPart::ShouldAllowOpenURL( | 1050 if (ChromeContentBrowserClientExtensionsPart::ShouldAllowOpenURL( |
1051 site_instance, from_url, url, &result)) | 1051 site_instance, from_url, url, &result)) |
1052 return result; | 1052 return result; |
1053 #endif | 1053 #endif |
1054 | 1054 |
1055 // Do not allow chrome://chrome-signin navigate to other chrome:// URLs, since | 1055 // Do not allow chrome://chrome-signin navigate to other chrome:// URLs, since |
1056 // the signin page may host untrusted web content. | 1056 // the signin page may host untrusted web content when <webview>-based signin |
1057 if (from_url.GetOrigin().spec() == chrome::kChromeUIChromeSigninURL && | 1057 // is not enabled. In the <webview> case, untrusted content is out-of-process |
1058 // and cannot navigate to chrome:// URLs. | |
1059 if (!switches::IsEnableWebviewBasedSignin() && | |
Charlie Reis
2015/02/04 22:02:57
I'm still hesitant to change this. It sounds like
| |
1060 from_url.GetOrigin().spec() == chrome::kChromeUIChromeSigninURL && | |
1058 url.SchemeIs(content::kChromeUIScheme) && | 1061 url.SchemeIs(content::kChromeUIScheme) && |
1059 url.host() != chrome::kChromeUIChromeSigninHost) { | 1062 url.host() != chrome::kChromeUIChromeSigninHost) { |
1060 VLOG(1) << "Blocked navigation to " << url.spec() << " from " | 1063 VLOG(1) << "Blocked navigation to " << url.spec() << " from " |
1061 << chrome::kChromeUIChromeSigninURL; | 1064 << chrome::kChromeUIChromeSigninURL; |
1062 return false; | 1065 return false; |
1063 } | 1066 } |
1064 | 1067 |
1065 return true; | 1068 return true; |
1066 } | 1069 } |
1067 | 1070 |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2664 switches::kDisableWebRtcEncryption, | 2667 switches::kDisableWebRtcEncryption, |
2665 }; | 2668 }; |
2666 to_command_line->CopySwitchesFrom(from_command_line, | 2669 to_command_line->CopySwitchesFrom(from_command_line, |
2667 kWebRtcDevSwitchNames, | 2670 kWebRtcDevSwitchNames, |
2668 arraysize(kWebRtcDevSwitchNames)); | 2671 arraysize(kWebRtcDevSwitchNames)); |
2669 } | 2672 } |
2670 } | 2673 } |
2671 #endif // defined(ENABLE_WEBRTC) | 2674 #endif // defined(ENABLE_WEBRTC) |
2672 | 2675 |
2673 } // namespace chrome | 2676 } // namespace chrome |
OLD | NEW |