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

Side by Side Diff: chrome/browser/ui/webui/uber/uber_ui.cc

Issue 2029263002: [MD Settings] Add feature to enable md-settings by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix URL CHECK statement. (Use URL, not Host) Created 4 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 unified diff | Download patch
OLDNEW
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/ui/webui/uber/uber_ui.h" 5 #include "chrome/browser/ui/webui/uber/uber_ui.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 10 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // TODO(jhawkins): Attempt to get rid of IDS_SHORT_PRODUCT_OS_NAME. 92 // TODO(jhawkins): Attempt to get rid of IDS_SHORT_PRODUCT_OS_NAME.
93 #if defined(OS_CHROMEOS) 93 #if defined(OS_CHROMEOS)
94 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_OS_NAME); 94 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_OS_NAME);
95 #else 95 #else
96 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_NAME); 96 source->AddLocalizedString("shortProductName", IDS_SHORT_PRODUCT_NAME);
97 #endif // defined(OS_CHROMEOS) 97 #endif // defined(OS_CHROMEOS)
98 98
99 source->AddBoolean("hideExtensions", ::switches::MdExtensionsEnabled()); 99 source->AddBoolean("hideExtensions", ::switches::MdExtensionsEnabled());
100 source->AddBoolean("hideSettingsAndHelp", 100 source->AddBoolean("hideSettingsAndHelp",
101 ::switches::SettingsWindowEnabled()); 101 ::switches::SettingsWindowEnabled() ||
102 base::FeatureList::IsEnabled(
103 features::kMaterialDesignSettingsFeature));
102 source->AddString("extensionsHost", chrome::kChromeUIExtensionsHost); 104 source->AddString("extensionsHost", chrome::kChromeUIExtensionsHost);
103 source->AddLocalizedString("extensionsDisplayName", 105 source->AddLocalizedString("extensionsDisplayName",
104 IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE); 106 IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE);
105 source->AddString("helpHost", chrome::kChromeUIHelpHost); 107 source->AddString("helpHost", chrome::kChromeUIHelpHost);
106 source->AddLocalizedString("helpDisplayName", IDS_ABOUT_TITLE); 108 source->AddLocalizedString("helpDisplayName", IDS_ABOUT_TITLE);
107 source->AddString("historyHost", chrome::kChromeUIHistoryHost); 109 source->AddString("historyHost", chrome::kChromeUIHistoryHost);
108 source->AddLocalizedString("historyDisplayName", IDS_HISTORY_TITLE); 110 source->AddLocalizedString("historyDisplayName", IDS_HISTORY_TITLE);
109 source->AddString("settingsHost", chrome::kChromeUISettingsHost); 111 source->AddString("settingsHost", chrome::kChromeUISettingsHost);
110 source->AddLocalizedString("settingsDisplayName", IDS_SETTINGS_TITLE); 112 source->AddLocalizedString("settingsDisplayName", IDS_SETTINGS_TITLE);
111 bool overrides_history = 113 bool overrides_history =
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // opens the default history page if one is uninstalled or disabled. 244 // opens the default history page if one is uninstalled or disabled.
243 UpdateHistoryNavigation(web_ui()); 245 UpdateHistoryNavigation(web_ui());
244 } 246 }
245 247
246 void UberFrameUI::OnExtensionUnloaded( 248 void UberFrameUI::OnExtensionUnloaded(
247 content::BrowserContext* browser_context, 249 content::BrowserContext* browser_context,
248 const extensions::Extension* extension, 250 const extensions::Extension* extension,
249 extensions::UnloadedExtensionInfo::Reason reason) { 251 extensions::UnloadedExtensionInfo::Reason reason) {
250 UpdateHistoryNavigation(web_ui()); 252 UpdateHistoryNavigation(web_ui());
251 } 253 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_ui.cc ('k') | chrome/browser/ui/webui/uber/uber_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698