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

Unified Diff: chrome/browser/browser.cc

Issue 2149003: Relanding 48042... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/defaults.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | chrome/browser/defaults.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698