Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 890183002: Allow Signin page to open other chrome:// URLs if login content in <webview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Middle ground Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698