summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 16:51:43 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 16:51:43 +0000
commit35dbd5463dddc3ef6a9abb881495275a46cf01a1 (patch)
tree06fc525a4d68bab7c0bebbc588005270d9010a84 /chrome/browser/browser_init.cc
parent7e242b5aae22d77d2447c11041e7b01c49d133c3 (diff)
downloadchromium_src-35dbd5463dddc3ef6a9abb881495275a46cf01a1.zip
chromium_src-35dbd5463dddc3ef6a9abb881495275a46cf01a1.tar.gz
chromium_src-35dbd5463dddc3ef6a9abb881495275a46cf01a1.tar.bz2
Open Chrome Window instead of tab when it is launched from a shortcut.
BUG=7356 Review URL: http://codereview.chromium.org/20074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9218 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index cba3366..7123a5d 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/net/dns_global.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
-#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/session_startup_pref.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
@@ -35,6 +34,7 @@
#include "chrome/browser/automation/automation_provider.h"
#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/net/url_fixer_upper.h"
+#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/sessions/session_restore.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
@@ -194,9 +194,12 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile,
// the home pages if no additional URLs were passed on the command line.
if (!OpenStartupURLs(process_startup, urls_to_open)) {
// Add the home page and any special first run URLs.
- AddStartupURLs(&urls_to_open);
- OpenURLsInBrowser(BrowserList::GetLastActive(), process_startup,
- urls_to_open);
+ Browser* browser = NULL;
+ if (urls_to_open.empty())
+ AddStartupURLs(&urls_to_open);
+ else
+ browser = BrowserList::GetLastActive();
+ OpenURLsInBrowser(browser, process_startup, urls_to_open);
}
}