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

Side by Side Diff: chrome/browser/android/ntp/new_tab_page_url_handler.cc

Issue 2547523003: Move Physical Web diagnostics page to new home (Closed)
Patch Set: Rebase Created 4 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/android/ntp/new_tab_page_url_handler.h" 5 #include "chrome/browser/android/ntp/new_tab_page_url_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 12 matching lines...) Expand all
23 content::BrowserContext* browser_context) { 23 content::BrowserContext* browser_context) {
24 if (url->SchemeIs(content::kChromeUIScheme)) { 24 if (url->SchemeIs(content::kChromeUIScheme)) {
25 // TODO(newt): stop redirecting chrome://welcome to chrome-native://newtab 25 // TODO(newt): stop redirecting chrome://welcome to chrome-native://newtab
26 // when M39 is a distant memory. http://crbug.com/455427 26 // when M39 is a distant memory. http://crbug.com/455427
27 if (url->host() == chrome::kChromeUINewTabHost || 27 if (url->host() == chrome::kChromeUINewTabHost ||
28 url->host() == kLegacyWelcomeHost) { 28 url->host() == kLegacyWelcomeHost) {
29 *url = GURL(chrome::kChromeUINativeNewTabURL); 29 *url = GURL(chrome::kChromeUINativeNewTabURL);
30 return true; 30 return true;
31 } 31 }
32 32
33 if (url->host() == kChromeUIPhysicalWebHost) { 33 if (url->host() == kChromeUIPhysicalWebDiagnosticsHost) {
34 *url = GURL(kChromeUINativePhysicalWebURL); 34 *url = GURL(kChromeUINativePhysicalWebDiagnosticsURL);
35 return true; 35 return true;
36 } 36 }
37 } 37 }
38 38
39 if (url->SchemeIs(chrome::kChromeNativeScheme) && 39 if (url->SchemeIs(chrome::kChromeNativeScheme) &&
40 url->host() == kChromeUIBookmarksHost) { 40 url->host() == kChromeUIBookmarksHost) {
41 std::string ref = url->ref(); 41 std::string ref = url->ref();
42 if (!ref.empty()) { 42 if (!ref.empty()) {
43 *url = GURL(std::string(kChromeUINativeBookmarksURL) 43 *url = GURL(std::string(kChromeUINativeBookmarksURL)
44 .append(kBookmarkFolderPath) 44 .append(kBookmarkFolderPath)
45 .append(ref)); 45 .append(ref));
46 return true; 46 return true;
47 } 47 }
48 } 48 }
49 49
50 return false; 50 return false;
51 } 51 }
52 52
53 } // namespace android 53 } // namespace android
54 } // namespace chrome 54 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698