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

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

Issue 2697723006: MD Settings: Fix subpage URLS for CrOS (Closed)
Patch Set: Fix browser_tests Created 3 years, 10 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 9c94470b99d627e8042f4c1f726560326b848836..311cc75e94c6b8fc5831431e7fed461fbf34562b 100644
--- a/chrome/browser/ui/ash/system_tray_client.cc
+++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -8,6 +8,7 @@
#include "ash/common/wm_shell.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/shell.h"
+#include "base/feature_list.h"
#include "base/logging.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
@@ -27,6 +28,7 @@
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/browser/upgrade_detector.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/url_constants.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
@@ -52,9 +54,6 @@ using views::Widget;
namespace {
-const char kDisplaySettingsSubPageName[] = "display";
-const char kPaletteSettingsSubPageName[] = "stylus-overlay";
-
SystemTrayClient* g_instance = nullptr;
void ShowSettingsSubPageForActiveUser(const std::string& sub_page) {
@@ -226,12 +225,12 @@ void SystemTrayClient::ShowSetTimeDialog() {
void SystemTrayClient::ShowDisplaySettings() {
content::RecordAction(base::UserMetricsAction("ShowDisplayOptions"));
- ShowSettingsSubPageForActiveUser(kDisplaySettingsSubPageName);
+ ShowSettingsSubPageForActiveUser(chrome::kDisplaySubPage);
}
void SystemTrayClient::ShowPowerSettings() {
content::RecordAction(base::UserMetricsAction("Tray_ShowPowerOptions"));
- ShowSettingsSubPageForActiveUser(chrome::kPowerOptionsSubPage);
+ ShowSettingsSubPageForActiveUser(chrome::kPowerSubPage);
}
void SystemTrayClient::ShowChromeSlow() {
@@ -270,7 +269,7 @@ void SystemTrayClient::ShowPaletteHelp() {
void SystemTrayClient::ShowPaletteSettings() {
content::RecordAction(base::UserMetricsAction("ShowPaletteOptions"));
- ShowSettingsSubPageForActiveUser(kPaletteSettingsSubPageName);
+ ShowSettingsSubPageForActiveUser(chrome::kStylusSubPage);
}
void SystemTrayClient::ShowPublicAccountInfo() {
@@ -321,9 +320,12 @@ void SystemTrayClient::ShowNetworkSettings(const std::string& network_id) {
return;
}
- std::string page = chrome::kInternetOptionsSubPage;
- if (!network_id.empty())
+ std::string page = chrome::kInternetSubPage;
+ if (!network_id.empty()) {
+ if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings))
+ page = chrome::kNetworkDetailSubPage;
page += "?guid=" + net::EscapeUrlEncodedData(network_id, true);
+ }
content::RecordAction(base::UserMetricsAction("OpenInternetOptionsDialog"));
ShowSettingsSubPageForActiveUser(page);
}

Powered by Google App Engine
This is Rietveld 408576698