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

Unified Diff: chrome/browser/ui/chrome_pages.cc

Issue 2913343002: Start removing deprecated Options UI code (Closed)
Patch Set: thestig@ review Created 3 years, 6 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/chrome_pages.cc
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc
index ce47b60929dbfeb31852d4431c9ca357b63f8a44..115eb7cfa1c476ee02eb199ce91088fc2834a1e0 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -7,7 +7,6 @@
#include <stddef.h>
#include "base/command_line.h"
-#include "base/feature_list.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/metrics/user_metrics.h"
@@ -32,7 +31,6 @@
#include "chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.h"
#include "chrome/browser/ui/webui/options/content_settings_handler.h"
#include "chrome/browser/ui/webui/site_settings_helper.h"
-#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
#include "components/bookmarks/browser/bookmark_model.h"
@@ -51,9 +49,7 @@
#endif
#if defined(OS_CHROMEOS)
-#include "base/feature_list.h"
#include "chrome/browser/chromeos/genius_app/app_id.h"
-#include "chrome/common/chrome_features.h"
#include "chrome/grit/generated_resources.h"
#include "extensions/browser/extension_registry.h"
#include "ui/base/l10n/l10n_util.h"
@@ -142,20 +138,15 @@ void ShowHelpImpl(Browser* browser, Profile* profile, HelpSource source) {
}
std::string GenerateContentSettingsExceptionsSubPage(ContentSettingsType type) {
- if (!base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) {
- return kDeprecatedOptionsContentSettingsExceptionsSubPage +
- std::string(kHashMark) +
- site_settings::ContentSettingsTypeToGroupName(type);
- }
-
// In MD Settings, the exceptions no longer have a separate subpage.
// This list overrides the group names defined in site_settings_helper for the
// purposes of URL generation for MD Settings only. We need this because some
// of the old group names are no longer appropriate: i.e. "plugins" =>
// "flash".
//
- // TODO(tommycli): Update the group names defined in site_settings_helper once
- // Options is removed from Chrome. Then this list will no longer be needed.
+ // TODO(crbug.com/728353): Update the group names defined in
+ // site_settings_helper once Options is removed from Chrome. Then this list
+ // will no longer be needed.
typedef std::map<ContentSettingsType, std::string> ContentSettingPathMap;
CR_DEFINE_STATIC_LOCAL(
ContentSettingPathMap, kSettingsPathOverrides,
@@ -175,13 +166,6 @@ std::string GenerateContentSettingsExceptionsSubPage(ContentSettingsType type) {
return std::string(kContentSettingsSubPage) + "/" + content_type_path;
}
-#if defined(OS_CHROMEOS)
-std::string GenerateContentSettingsSearchQueryPath(int query_message_id) {
- return std::string(chrome::kDeprecatedOptionsSearchSubPage) + kHashMark +
- l10n_util::GetStringUTF8(query_message_id);
-}
-#endif
-
} // namespace
void ShowBookmarkManager(Browser* browser) {
@@ -317,24 +301,6 @@ void ShowSettingsSubPageForProfile(Profile* profile,
const std::string& sub_page) {
std::string sub_page_path = sub_page;
-#if defined(OS_CHROMEOS)
- if (!base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) {
- if (sub_page == chrome::kAccessibilitySubPage) {
- sub_page_path = GenerateContentSettingsSearchQueryPath(
- IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY);
- } else if (sub_page == chrome::kBluetoothSubPage) {
- sub_page_path = GenerateContentSettingsSearchQueryPath(
- IDS_OPTIONS_SETTINGS_SECTION_TITLE_BLUETOOTH);
- } else if (sub_page == chrome::kDateTimeSubPage) {
- sub_page_path = GenerateContentSettingsSearchQueryPath(
- IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME);
- } else if (sub_page == chrome::kStylusSubPage ||
- sub_page == chrome::kPowerSubPage) {
- sub_page_path += "-overlay";
- }
- }
-#endif
-
if (::switches::SettingsWindowEnabled()) {
base::RecordAction(base::UserMetricsAction("ShowOptions"));
SettingsWindowManager::GetInstance()->ShowChromePageForProfile(
« no previous file with comments | « chrome/browser/ui/ash/system_tray_client.cc ('k') | chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698