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

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

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 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/browser/android/chrome_feature_list.h" 10 #include "chrome/browser/android/chrome_feature_list.h"
(...skipping 17 matching lines...) Expand all
28 // when M39 is a distant memory. http://crbug.com/455427 28 // when M39 is a distant memory. http://crbug.com/455427
29 if (url->host() == chrome::kChromeUINewTabHost || 29 if (url->host() == chrome::kChromeUINewTabHost ||
30 url->host() == kLegacyWelcomeHost) { 30 url->host() == kLegacyWelcomeHost) {
31 *url = GURL(chrome::kChromeUINativeNewTabURL); 31 *url = GURL(chrome::kChromeUINativeNewTabURL);
32 return true; 32 return true;
33 } 33 }
34 34
35 // TODO(twellington): stop redirecting chrome://history to 35 // TODO(twellington): stop redirecting chrome://history to
36 // chrome-native://history when M57 is a distant memory. 36 // chrome-native://history when M57 is a distant memory.
37 // See http://crbug.com/654071. 37 // See http://crbug.com/654071.
38 if (base::FeatureList::IsEnabled(features::kNativeAndroidHistoryManager) && 38 if (url->host() == kChromeUIHistoryHost ||
39 (url->host() == kChromeUIHistoryHost || 39 url->host() == kDeprecatedChromeUIHistoryFrameHost) {
40 url->host() == kChromeUIHistoryFrameHost)) {
41 *url = GURL(kChromeUINativeHistoryURL); 40 *url = GURL(kChromeUINativeHistoryURL);
42 return true; 41 return true;
43 } 42 }
44 43
45 if (url->host() == kChromeUIPhysicalWebDiagnosticsHost) { 44 if (url->host() == kChromeUIPhysicalWebDiagnosticsHost) {
46 *url = GURL(kChromeUINativePhysicalWebDiagnosticsURL); 45 *url = GURL(kChromeUINativePhysicalWebDiagnosticsURL);
47 return true; 46 return true;
48 } 47 }
49 } 48 }
50 49
51 if (url->SchemeIs(chrome::kChromeNativeScheme) && 50 if (url->SchemeIs(chrome::kChromeNativeScheme) &&
52 url->host() == kChromeUIBookmarksHost) { 51 url->host() == kChromeUIBookmarksHost) {
53 std::string ref = url->ref(); 52 std::string ref = url->ref();
54 if (!ref.empty()) { 53 if (!ref.empty()) {
55 *url = GURL(std::string(kChromeUINativeBookmarksURL) 54 *url = GURL(std::string(kChromeUINativeBookmarksURL)
56 .append(kBookmarkFolderPath) 55 .append(kBookmarkFolderPath)
57 .append(ref)); 56 .append(ref));
58 return true; 57 return true;
59 } 58 }
60 } 59 }
61 60
62 return false; 61 return false;
63 } 62 }
64 63
65 } // namespace android 64 } // namespace android
66 } // namespace chrome 65 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/data_usage/data_use_ui_tab_model_unittest.cc ('k') | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698