Commit 98a92447 authored by rlp@chromium.org's avatar rlp@chromium.org

[Hotword] Do not open about:voicesearch page in incognito to prevent crash.

Voice search is not available in incognito mode so if 
prompted to open the about:voicesearch page while in an 
incognito window, instead redirect and open it in a new tab 
in the parent profile's current window. This is how other 
about: pages handle this situation.

BUG=400151
TEST=open an incognito window, navigate to about://voicesearch,
observe that it opens in a new tab in the parent window and does not crash.

Review URL: https://codereview.chromium.org/450763002

Cr-Commit-Position: refs/heads/master@{#288289}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288289 0039d316-1c4b-4281-b951-d872f2087c98
parent f4bfa767
...@@ -734,7 +734,8 @@ bool IsURLAllowedInIncognito(const GURL& url, ...@@ -734,7 +734,8 @@ bool IsURLAllowedInIncognito(const GURL& url,
url.host() == chrome::kChromeUIThumbnailHost2 || url.host() == chrome::kChromeUIThumbnailHost2 ||
url.host() == chrome::kChromeUIThumbnailListHost || url.host() == chrome::kChromeUIThumbnailListHost ||
url.host() == chrome::kChromeUISuggestionsHost || url.host() == chrome::kChromeUISuggestionsHost ||
url.host() == chrome::kChromeUIDevicesHost)) { url.host() == chrome::kChromeUIDevicesHost ||
url.host() == chrome::kChromeUIVoiceSearchHost)) {
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment