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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2830983005: Remove old webui History page on desktop and mobile (Closed)
Patch Set: merge Created 3 years, 7 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
« no previous file with comments | « ios/chrome/browser/chrome_url_constants.cc ('k') | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index f9c0d98cb20e905a94d91ae4521d314f2dc2ea45..e3f9ee5daf9c9b0b6c06fbeaa3fbc199e6eb2675 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -273,12 +273,8 @@ enum HeaderBehaviour {
const CGFloat kIPadFindBarOverlap = 11;
bool IsURLAllowedInIncognito(const GURL& url) {
- // Most URLs are allowed in incognito; the following are exceptions.
- if (!url.SchemeIs(kChromeUIScheme))
- return true;
- std::string url_host = url.host();
- return url_host != kChromeUIHistoryHost &&
- url_host != kChromeUIHistoryFrameHost;
+ // Most URLs are allowed in incognito; the following is an exception.
+ return !(url.SchemeIs(kChromeUIScheme) && url.host() == kChromeUIHistoryHost);
}
// Temporary key to use when storing native controllers vended to tabs before
@@ -3103,13 +3099,6 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
DCHECK(![self hasControllerForURL:url]);
// In any other case the PageNotAvailableController is returned.
nativeController = [[PageNotAvailableController alloc] initWithUrl:url];
- if (url_host == kChromeUIHistoryFrameHost) {
- base::mac::ObjCCastStrict<PageNotAvailableController>(nativeController)
- .descriptionText = l10n_util::GetNSStringFWithFixup(
- IDS_IOS_HISTORY_URL_NOT_AVAILABLE,
- base::UTF8ToUTF16(kChromeUIHistoryURL),
- l10n_util::GetStringUTF16(IDS_HISTORY_SHOW_HISTORY));
- }
}
// If a native controller is vended before its tab is added to the tab model,
// use the temporary key and add it under the new tab's tabId in the
@@ -3709,7 +3698,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
}
// NOTE: This check for the Crash Host URL is here to avoid the URL from
- // ending up in the history causign the app to crash at every subsequent
+ // ending up in the history causing the app to crash at every subsequent
// restart.
if (url.host() == kChromeUIBrowserCrashHost) {
[self induceBrowserCrash];
« no previous file with comments | « ios/chrome/browser/chrome_url_constants.cc ('k') | testing/variations/fieldtrial_testing_config.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698