diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-24 16:38:40 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-24 16:38:40 +0000 |
commit | a807d3fceadd4838c346ba9d5b68798a0b4081d6 (patch) | |
tree | 1c68747834fd1c2da3e522fab91ba43fda62d8b3 /chrome/browser/browser.cc | |
parent | 2ae892453109680699580853e78e89419bceb7a8 (diff) | |
download | chromium_src-a807d3fceadd4838c346ba9d5b68798a0b4081d6.zip chromium_src-a807d3fceadd4838c346ba9d5b68798a0b4081d6.tar.gz chromium_src-a807d3fceadd4838c346ba9d5b68798a0b4081d6.tar.bz2 |
Revert 48042: it breaks unit-tests and UI tests on ChromeOS
Disabling app launcher and enabling apps by default on ChromeOS .
BUG=3218
TEST=Open the new tab, the new new tab should be shown. Any installed
app should be showing in there.
Review URL: http://codereview.chromium.org/2135011
TBR=jcivelli@chromium.org
Review URL: http://codereview.chromium.org/2077020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index f86a9d0..b723a85c 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1050,13 +1050,17 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) { } bool Browser::OpenAppsPanelAsNewTab() { -#if defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_WIN) CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kAppsPanel)) { - AppLauncher::ShowForNewTab(this, std::string()); - return true; + if (command_line->HasSwitch(switches::kDisableAppsPanel) || + (!browser_defaults::kShowAppsPanelForNewTab && + !command_line->HasSwitch(switches::kAppsPanel))) { + return false; } -#endif + AppLauncher::ShowForNewTab(this, std::string()); + return true; +#endif // OS_CHROMEOS || OS_WIN + return false; } @@ -2080,7 +2084,7 @@ void Browser::ExecuteCommand(int id) { TabContents* Browser::AddBlankTab(bool foreground) { // To make a more "launchy" experience, try to reuse an existing NTP if there // is one. - if (Extension::AppsAreEnabled()) { + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) { for (int i = tabstrip_model_.count() - 1; i >= 0; --i) { TabContents* contents = tabstrip_model_.GetTabContentsAt(i); if (StartsWithASCII(contents->GetURL().spec(), |