Commit 44c1d487 authored by pkasting@chromium.org's avatar pkasting@chromium.org

Open a new tab page rather than the homepage if startup is set to "open the...

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
parent aacfcc78
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h" #include "chrome/common/pref_service.h"
#include "chrome/common/result_codes.h" #include "chrome/common/result_codes.h"
#include "chrome/common/url_constants.h"
#include "grit/chromium_strings.h" #include "grit/chromium_strings.h"
#include "grit/generated_resources.h" #include "grit/generated_resources.h"
#include "grit/locale_settings.h" #include "grit/locale_settings.h"
...@@ -477,8 +478,13 @@ bool BrowserInit::LaunchWithProfile::OpenStartupURLs( ...@@ -477,8 +478,13 @@ bool BrowserInit::LaunchWithProfile::OpenStartupURLs(
// When the user launches the app only open the default set of URLs if // 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. // we aren't going to open any URLs on the command line.
if (urls_to_open.empty()) { if (urls_to_open.empty()) {
if (pref.urls.empty()) if (pref.urls.empty()) {
return false; // No URLs to open. // 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); OpenURLsInBrowser(NULL, is_process_startup, pref.urls);
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment