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

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

Issue 2751653004: MD History: re-use history host constant from content/ instead of duplicating to chrome/ (Closed)
Patch Set: merge Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
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 (base::FeatureList::IsEnabled(features::kNativeAndroidHistoryManager) &&
39 (url->host() == kChromeUIHistoryHost || 39 (url->host() == content::kChromeUIHistoryHost ||
40 url->host() == kChromeUIHistoryFrameHost)) { 40 url->host() == kChromeUIHistoryFrameHost)) {
41 *url = GURL(content::kChromeUINativeHistoryURL); 41 *url = GURL(content::kChromeUINativeHistoryURL);
42 return true; 42 return true;
43 } 43 }
44 44
45 if (url->host() == kChromeUIPhysicalWebDiagnosticsHost) { 45 if (url->host() == kChromeUIPhysicalWebDiagnosticsHost) {
46 *url = GURL(kChromeUINativePhysicalWebDiagnosticsURL); 46 *url = GURL(kChromeUINativePhysicalWebDiagnosticsURL);
47 return true; 47 return true;
48 } 48 }
49 } 49 }
50 50
51 if (url->SchemeIs(chrome::kChromeNativeScheme) && 51 if (url->SchemeIs(chrome::kChromeNativeScheme) &&
52 url->host() == kChromeUIBookmarksHost) { 52 url->host() == kChromeUIBookmarksHost) {
53 std::string ref = url->ref(); 53 std::string ref = url->ref();
54 if (!ref.empty()) { 54 if (!ref.empty()) {
55 *url = GURL(std::string(kChromeUINativeBookmarksURL) 55 *url = GURL(std::string(kChromeUINativeBookmarksURL)
56 .append(kBookmarkFolderPath) 56 .append(kBookmarkFolderPath)
57 .append(ref)); 57 .append(ref));
58 return true; 58 return true;
59 } 59 }
60 } 60 }
61 61
62 return false; 62 return false;
63 } 63 }
64 64
65 } // namespace android 65 } // namespace android
66 } // namespace chrome 66 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698