summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 19:44:07 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 19:44:07 +0000
commit44c1d4872df77d6ac3bd064a7634078c443a332f (patch)
treeb77b9dbfa26c530cd4834f74a83c3e87f20b9e3c /chrome/browser/browser_init.cc
parentaacfcc78f2fc853bb8eecb33afb30e19a6b34e90 (diff)
downloadchromium_src-44c1d4872df77d6ac3bd064a7634078c443a332f.zip
chromium_src-44c1d4872df77d6ac3bd064a7634078c443a332f.tar.gz
chromium_src-44c1d4872df77d6ac3bd064a7634078c443a332f.tar.bz2
Open a new tab page rather than the homepage if startup is set to "open the following" with a blank list. Patch by Yuzo Fujishima (see http://codereview.chromium.org/113444 ), r=beng.
BUG=6901 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 3e6d041..42b41cf 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -41,6 +41,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/result_codes.h"
+#include "chrome/common/url_constants.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -477,8 +478,13 @@ bool BrowserInit::LaunchWithProfile::OpenStartupURLs(
// When the user launches the app only open the default set of URLs if
// we aren't going to open any URLs on the command line.
if (urls_to_open.empty()) {
- if (pref.urls.empty())
- return false; // No URLs to open.
+ if (pref.urls.empty()) {
+ // Open a New Tab page.
+ std::vector<GURL> urls;
+ urls.push_back(GURL(chrome::kChromeUINewTabURL));
+ OpenURLsInBrowser(NULL, is_process_startup, urls);
+ return true;
+ }
OpenURLsInBrowser(NULL, is_process_startup, pref.urls);
return true;
}