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

Unified Diff: chrome/renderer/searchbox/searchbox_extension.cc

Issue 1669723002: NTP: don't allow navigateContentWindow to navigate where it pleases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: -IWYU Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/searchbox/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc
index 5dc7ae5ac91322ffd16f8e7eede21a2f2d861a8b..84338e011b2b6a1595b8f38b8fff10b2f4b1e9d7 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -1165,6 +1165,8 @@ void SearchBoxExtensionWrapper::NavigateContentWindow(
DVLOG(1) << render_view << " NavigateContentWindow: " << destination_url;
// Navigate the main frame.
+ // TODO(treib): Remove this check, since it's redundant with the browser-side
Charlie Reis 2016/02/04 18:37:53 I disagree with removing this. It's fine to have
dcheng 2016/02/04 18:41:32 On the flip side, having it here makes it tempting
Charlie Reis 2016/02/04 18:45:23 // Navigate the main frame. Note that the safety c
dcheng 2016/02/04 19:05:01 Done.
+ // check.
if (destination_url.is_valid() &&
!destination_url.SchemeIs(url::kJavaScriptScheme)) {
WindowOpenDisposition disposition = CURRENT_TAB;

Powered by Google App Engine
This is Rietveld 408576698