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

Unified Diff: chrome/browser/browser_init.cc

Issue 113444: Open a new tab page if the "Open the following pages" option is speified... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_init.cc
===================================================================
--- chrome/browser/browser_init.cc (revision 16040)
+++ chrome/browser/browser_init.cc (working copy)
@@ -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"
@@ -489,8 +490,13 @@
// 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698