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/ui/browser_navigator.cc

Issue 450763002: [Hotword] Do not open about:voicesearch page in incognito to prevent crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | no next file » | 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/ui/browser_navigator.h" 5 #include "chrome/browser/ui/browser_navigator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 url.host() == chrome::kChromeUIExtensionsHost || 727 url.host() == chrome::kChromeUIExtensionsHost ||
728 url.host() == chrome::kChromeUIBookmarksHost || 728 url.host() == chrome::kChromeUIBookmarksHost ||
729 #if !defined(OS_CHROMEOS) 729 #if !defined(OS_CHROMEOS)
730 url.host() == chrome::kChromeUIChromeSigninHost || 730 url.host() == chrome::kChromeUIChromeSigninHost ||
731 #endif 731 #endif
732 url.host() == chrome::kChromeUIUberHost || 732 url.host() == chrome::kChromeUIUberHost ||
733 url.host() == chrome::kChromeUIThumbnailHost || 733 url.host() == chrome::kChromeUIThumbnailHost ||
734 url.host() == chrome::kChromeUIThumbnailHost2 || 734 url.host() == chrome::kChromeUIThumbnailHost2 ||
735 url.host() == chrome::kChromeUIThumbnailListHost || 735 url.host() == chrome::kChromeUIThumbnailListHost ||
736 url.host() == chrome::kChromeUISuggestionsHost || 736 url.host() == chrome::kChromeUISuggestionsHost ||
737 url.host() == chrome::kChromeUIDevicesHost)) { 737 url.host() == chrome::kChromeUIDevicesHost ||
738 url.host() == chrome::kChromeUIVoiceSearchHost)) {
738 return false; 739 return false;
739 } 740 }
740 741
741 if (url.scheme() == chrome::kChromeSearchScheme && 742 if (url.scheme() == chrome::kChromeSearchScheme &&
742 (url.host() == chrome::kChromeUIThumbnailHost || 743 (url.host() == chrome::kChromeUIThumbnailHost ||
743 url.host() == chrome::kChromeUIThumbnailHost2 || 744 url.host() == chrome::kChromeUIThumbnailHost2 ||
744 url.host() == chrome::kChromeUIThumbnailListHost || 745 url.host() == chrome::kChromeUIThumbnailListHost ||
745 url.host() == chrome::kChromeUISuggestionsHost)) { 746 url.host() == chrome::kChromeUISuggestionsHost)) {
746 return false; 747 return false;
747 } 748 }
748 749
749 GURL rewritten_url = url; 750 GURL rewritten_url = url;
750 bool reverse_on_redirect = false; 751 bool reverse_on_redirect = false;
751 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary( 752 content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
752 &rewritten_url, browser_context, &reverse_on_redirect); 753 &rewritten_url, browser_context, &reverse_on_redirect);
753 754
754 // Some URLs are mapped to uber subpages. Do not allow them in incognito. 755 // Some URLs are mapped to uber subpages. Do not allow them in incognito.
755 return !(rewritten_url.scheme() == content::kChromeUIScheme && 756 return !(rewritten_url.scheme() == content::kChromeUIScheme &&
756 rewritten_url.host() == chrome::kChromeUIUberHost); 757 rewritten_url.host() == chrome::kChromeUIUberHost);
757 } 758 }
758 759
759 } // namespace chrome 760 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698