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

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

Issue 313363004: Separate Settings and Help from History and Extensions when settings-in- (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: JS edits Created 6 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 96933fceda212189e0fd38f40c2150539acc3717..e2c295c2fa4ad3d4b29bccc0e3d3561f9fd7f740 100644
--- a/chrome/browser/ui/chrome_pages.cc
+++ b/chrome/browser/ui/chrome_pages.cc
@@ -108,7 +108,7 @@ void ShowHelpImpl(Browser* browser,
ShowSingletonTab(browser, url);
}
-bool SettingsWindowEnabled() {
+bool IsSettingsWindowEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableSettingsWindow);
}
@@ -129,11 +129,6 @@ void ShowBookmarkManagerForNode(Browser* browser, int64 node_id) {
void ShowHistory(Browser* browser) {
content::RecordAction(UserMetricsAction("ShowHistory"));
- if (SettingsWindowEnabled()) {
- SettingsWindowManager::GetInstance()->ShowChromePageForProfile(
- browser->profile(), GURL(kChromeUIHistoryURL));
- return;
- }
NavigateParams params(
GetSingletonTabNavigateParams(browser, GURL(kChromeUIHistoryURL)));
params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE;
@@ -156,11 +151,6 @@ void ShowDownloads(Browser* browser) {
void ShowExtensions(Browser* browser,
const std::string& extension_to_highlight) {
content::RecordAction(UserMetricsAction("ShowExtensions"));
- if (SettingsWindowEnabled()) {
- SettingsWindowManager::GetInstance()->ShowChromePageForProfile(
- browser->profile(), GURL(kChromeUIExtensionsURL));
- return;
- }
NavigateParams params(
GetSingletonTabNavigateParams(browser, GURL(kChromeUIExtensionsURL)));
params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE;
@@ -244,7 +234,7 @@ void ShowSettings(Browser* browser) {
}
void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) {
- if (SettingsWindowEnabled()) {
+ if (IsSettingsWindowEnabled()) {
ShowSettingsSubPageForProfile(browser->profile(), sub_page);
return;
}
@@ -253,7 +243,7 @@ void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) {
void ShowSettingsSubPageForProfile(Profile* profile,
const std::string& sub_page) {
- if (SettingsWindowEnabled()) {
+ if (IsSettingsWindowEnabled()) {
content::RecordAction(base::UserMetricsAction("ShowOptions"));
SettingsWindowManager::GetInstance()->ShowChromePageForProfile(
profile, GetSettingsUrl(sub_page));

Powered by Google App Engine
This is Rietveld 408576698