diff options
author | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 07:15:15 +0000 |
---|---|---|
committer | csilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 07:15:15 +0000 |
commit | f5ec7242455afc1747ef0d328990d567d8b2b2fe (patch) | |
tree | c31e9ce6c197723e79852fa2738984ee7f1f9f2f /chrome/browser/ui | |
parent | 0520a2e2eae31d4fe13cc5bff11eb86fa8f0a3d8 (diff) | |
download | chromium_src-f5ec7242455afc1747ef0d328990d567d8b2b2fe.zip chromium_src-f5ec7242455afc1747ef0d328990d567d8b2b2fe.tar.gz chromium_src-f5ec7242455afc1747ef0d328990d567d8b2b2fe.tar.bz2 |
[uber page] Enable Uber page by default.
- Forward settings and extensions URLS to the uber page.
- Add command-line switch and about flag for disabling uber page.
- Add support for invoking subpage URLS via the uber page.
BUG=110656
TEST=Exercise settings/extensions URLS with and without flag set.
Review URL: https://chromiumcodereview.appspot.com/9234010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/browser.cc | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 04ea7e9..97b9dd2 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -2230,7 +2230,15 @@ void Browser::ShowDownloadsTab() { void Browser::ShowExtensionsTab() { content::RecordAction(UserMetricsAction("ShowExtensions")); - ShowOptionsTab(chrome::kExtensionsSubPage); + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableUberPage)) { + ShowOptionsTab(chrome::kExtensionsSubPage); + } else { + browser::NavigateParams params(GetSingletonTabNavigateParams( + GURL(std::string(chrome::kChromeUIUberURL) + + chrome::kChromeUIExtensionsHost))); + params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + ShowSingletonTabOverwritingNTP(params); + } } void Browser::ShowAboutConflictsTab() { @@ -2254,11 +2262,18 @@ void Browser::ShowBrokenPageTab(WebContents* contents) { } void Browser::ShowOptionsTab(const std::string& sub_page) { - browser::NavigateParams params(GetSingletonTabNavigateParams( - GURL(chrome::kChromeUISettingsURL + sub_page))); - params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; - - ShowSingletonTabOverwritingNTP(params); + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableUberPage)) { + browser::NavigateParams params(GetSingletonTabNavigateParams( + GURL(chrome::kChromeUISettingsURL + sub_page))); + params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + ShowSingletonTabOverwritingNTP(params); + } else { + browser::NavigateParams params(GetSingletonTabNavigateParams( + GURL(std::string(chrome::kChromeUIUberURL) + + chrome::kChromeUISettingsHost + '/' + sub_page))); + params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; + ShowSingletonTabOverwritingNTP(params); + } } void Browser::OpenClearBrowsingDataDialog() { |