OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Otherwise, it's handled by the uber settings page. | 73 // Otherwise, it's handled by the uber settings page. |
74 if (base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) { | 74 if (base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) { |
75 host = chrome::kChromeUIExtensionsHost; | 75 host = chrome::kChromeUIExtensionsHost; |
76 path = url->path(); | 76 path = url->path(); |
77 } else { | 77 } else { |
78 host = chrome::kChromeUIUberHost; | 78 host = chrome::kChromeUIUberHost; |
79 path = chrome::kChromeUIExtensionsHost + url->path(); | 79 path = chrome::kChromeUIExtensionsHost + url->path(); |
80 } | 80 } |
81 // Redirect chrome://settings/extensions (legacy URL). | 81 // Redirect chrome://settings/extensions (legacy URL). |
82 } else if (host == chrome::kChromeUISettingsHost && | 82 } else if (host == chrome::kChromeUISettingsHost && |
83 url->path() == std::string("/") + chrome::kExtensionsSubPage) { | 83 url->path() == |
| 84 std::string("/") + chrome::kDeprecatedExtensionsSubPage) { |
84 host = chrome::kChromeUIUberHost; | 85 host = chrome::kChromeUIUberHost; |
85 path = chrome::kChromeUIExtensionsHost; | 86 path = chrome::kChromeUIExtensionsHost; |
86 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 87 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
87 // Redirect chrome://history. | 88 // Redirect chrome://history. |
88 } else if (host == chrome::kChromeUIHistoryHost) { | 89 } else if (host == chrome::kChromeUIHistoryHost) { |
89 #if defined(OS_ANDROID) | 90 #if defined(OS_ANDROID) |
90 // TODO(twellington): remove this after native Android history launches. | 91 // TODO(twellington): remove this after native Android history launches. |
91 // See http://crbug.com/654071. | 92 // See http://crbug.com/654071. |
92 if (!base::FeatureList::IsEnabled(features::kNativeAndroidHistoryManager)) { | 93 if (!base::FeatureList::IsEnabled(features::kNativeAndroidHistoryManager)) { |
93 // On Android, redirect directly to chrome://history-frame since | 94 // On Android, redirect directly to chrome://history-frame since |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 FROM_HERE, base::Bind(&chrome::AttemptRestart)); | 150 FROM_HERE, base::Bind(&chrome::AttemptRestart)); |
150 return true; | 151 return true; |
151 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) { | 152 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) { |
152 base::ThreadTaskRunnerHandle::Get()->PostTask( | 153 base::ThreadTaskRunnerHandle::Get()->PostTask( |
153 FROM_HERE, base::Bind(&chrome::AttemptExit)); | 154 FROM_HERE, base::Bind(&chrome::AttemptExit)); |
154 return true; | 155 return true; |
155 } | 156 } |
156 | 157 |
157 return false; | 158 return false; |
158 } | 159 } |
OLD | NEW |