Commit fa0dd99a authored by Nnamdi Theodore Johnson-Kanu's avatar Nnamdi Theodore Johnson-Kanu Committed by Commit Bot

[CrOS settings] Add DCHECK when opening browser settings page

With most of routes shared between ChromeOS and browser renamed except
for Sync routes, a DCHECK can be used when opening browser settings
pages to that the |sub_page| is not an OS-specific setting.

Bug: 990169
Change-Id: I84ca6c5584d405d3a2deed2d61878c70d3744c54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2138115
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758529}
parent 002bc1bd
...@@ -386,14 +386,9 @@ void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) { ...@@ -386,14 +386,9 @@ void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) {
void ShowSettingsSubPageForProfile(Profile* profile, void ShowSettingsSubPageForProfile(Profile* profile,
const std::string& sub_page) { const std::string& sub_page) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
SettingsWindowManager* settings = SettingsWindowManager::GetInstance(); // OS settings sub-pages are handled else where and should never be
// TODO(jamescook): When SplitSettings is close to shipping, change this to // encountered here.
// a DCHECK that the |sub_page| is not an OS-specific setting. DCHECK(!chrome::IsOSSettingsSubPage(sub_page)) << sub_page;
if (chrome::IsOSSettingsSubPage(sub_page)) {
settings->ShowOSSettings(profile, sub_page);
return;
}
// Fall through and open browser settings in a tab.
#endif #endif
Browser* browser = chrome::FindTabbedBrowser(profile, false); Browser* browser = chrome::FindTabbedBrowser(profile, false);
if (!browser) if (!browser)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment