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

Unified Diff: chrome/browser/android/new_tab_page_url_handler.cc

Issue 1036533002: Redirect chrome://welcome to the new tab page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | chrome/common/url_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/new_tab_page_url_handler.cc
diff --git a/chrome/browser/android/new_tab_page_url_handler.cc b/chrome/browser/android/new_tab_page_url_handler.cc
index 8561c228c60d8a0094c6aa1643bc512a0b64bf2b..da57f5798b37f67b91e57072eec7c7da0e327d65 100644
--- a/chrome/browser/android/new_tab_page_url_handler.cc
+++ b/chrome/browser/android/new_tab_page_url_handler.cc
@@ -13,6 +13,7 @@
namespace {
const char kBookmarkFolderPath[] = "folder/";
+const char kLegacyWelcomeHost[] = "welcome";
}
namespace chrome {
@@ -20,10 +21,14 @@ namespace android {
bool HandleAndroidNativePageURL(GURL* url,
content::BrowserContext* browser_context) {
- if (url->SchemeIs(content::kChromeUIScheme) &&
- url->host() == chrome::kChromeUINewTabHost) {
- *url = GURL(chrome::kChromeUINativeNewTabURL);
- return true;
+ if (url->SchemeIs(content::kChromeUIScheme)) {
+ // TODO(newt): stop redirecting chrome://welcome to chrome-native://newtab
+ // when M39 is a distant memory. http://crbug.com/455427
+ if (url->host() == chrome::kChromeUINewTabHost ||
+ url->host() == kLegacyWelcomeHost) {
+ *url = GURL(chrome::kChromeUINativeNewTabURL);
+ return true;
+ }
}
if (url->SchemeIs(chrome::kChromeNativeScheme) &&
« no previous file with comments | « no previous file | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698