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

Unified Diff: chrome/browser/ui/ash/system_tray_client.cc

Issue 2455113003: MD Settings: Fix Client Navigations to Search Query URLs (Closed)
Patch Set: merge Created 4 years, 2 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
Index: chrome/browser/ui/ash/system_tray_client.cc
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc
index 946fda056617dfe7d8ec68e20b4aa0622b780200..15b0e500edbf4c7d91da8bdb0aeb45f6a872dcbf 100644
--- a/chrome/browser/ui/ash/system_tray_client.cc
+++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -10,6 +10,7 @@
#include "ash/public/cpp/shell_window_ids.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/feature_list.h"
#include "base/logging.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
@@ -24,6 +25,7 @@
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/browser/ui/singleton_tabs.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/dbus/dbus_thread_manager.h"
@@ -140,9 +142,14 @@ void SystemTrayClient::ShowSettings() {
void SystemTrayClient::ShowDateSettings() {
content::RecordAction(base::UserMetricsAction("ShowDateOptions"));
- std::string sub_page =
- std::string(chrome::kSearchSubPage) + "#" +
- l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
+ std::string sub_page;
+ if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) {
+ sub_page = chrome::kDateTimeSubPage;
+ } else {
+ sub_page =
+ std::string(chrome::kDeprecatedOptionsSearchSubPage) + "#" +
+ l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
+ }
// Everybody can change the time zone (even though it is a device setting).
chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(),
sub_page);
@@ -186,9 +193,14 @@ void SystemTrayClient::ShowAccessibilityHelp() {
void SystemTrayClient::ShowAccessibilitySettings() {
content::RecordAction(base::UserMetricsAction("ShowAccessibilitySettings"));
- std::string sub_page = std::string(chrome::kSearchSubPage) + "#" +
- l10n_util::GetStringUTF8(
- IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY);
+ std::string sub_page;
+ if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) {
+ sub_page = chrome::kAccessibilitySubPage;
+ } else {
+ sub_page = std::string(chrome::kDeprecatedOptionsSearchSubPage) + "#" +
+ l10n_util::GetStringUTF8(
+ IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY);
+ }
ShowSettingsSubPageForActiveUser(sub_page);
}

Powered by Google App Engine
This is Rietveld 408576698