Index: chrome/browser/browser.cc |
=================================================================== |
--- chrome/browser/browser.cc (revision 48045) |
+++ chrome/browser/browser.cc (working copy) |
@@ -1052,15 +1052,11 @@ |
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 @@ |
// 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); |
} |