-
Notifications
You must be signed in to change notification settings - Fork 893
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix all brave pages are loaded in private window
Some brave pages should not be loaded in private window such as brave://settings. Instead, they should be redirected to normal window. Also sync/rewards host are added to not allowed list.
- Loading branch information
Showing
3 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc | ||
index 57cc96c276c1106079828b5e359a3d88e1c901ce..32d1e9d68577760d78345630204b30ae0bb1bfca 100644 | ||
--- a/chrome/browser/ui/browser_navigator.cc | ||
+++ b/chrome/browser/ui/browser_navigator.cc | ||
@@ -700,6 +700,9 @@ void Navigate(NavigateParams* params) { | ||
bool IsHostAllowedInIncognito(const GURL& url) { | ||
std::string scheme = url.scheme(); | ||
base::StringPiece host = url.host_piece(); | ||
+#if defined(BRAVE_CHROMIUM_BUILD) | ||
+ if (!IsHostAllowedInIncognitoBraveImpl(&scheme, host)) return false; | ||
+#endif | ||
if (scheme == chrome::kChromeSearchScheme) { | ||
return host != chrome::kChromeUIThumbnailHost && | ||
host != chrome::kChromeUIThumbnailHost2 && |