diff options
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index b723a85c..68d14ca 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1052,15 +1052,11 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) { bool Browser::OpenAppsPanelAsNewTab() { #if defined(OS_CHROMEOS) || defined(OS_WIN) CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kDisableAppsPanel) || - (!browser_defaults::kShowAppsPanelForNewTab && - !command_line->HasSwitch(switches::kAppsPanel))) { - return false; + if (command_line->HasSwitch(switches::kAppsPanel)) { + AppLauncher::ShowForNewTab(this, std::string()); + return true; } - AppLauncher::ShowForNewTab(this, std::string()); - return true; -#endif // OS_CHROMEOS || OS_WIN - +#endif return false; } @@ -2082,21 +2078,6 @@ void Browser::ExecuteCommand(int id) { // Browser, TabStripModelDelegate implementation: TabContents* Browser::AddBlankTab(bool foreground) { - // To make a more "launchy" experience, try to reuse an existing NTP if there - // is one. - 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(), - chrome::kChromeUINewTabURL, true)) { - if (foreground) - SelectTabContentsAt(i, true); - - return contents; - } - } - } - return AddBlankTabAt(-1, foreground); } |