Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc |
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
index d3f1d623800906893153ca47b6fe3e60300bf800..7a2e089279b4501710be7bdc0e35569f03d1d4a7 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
@@ -447,8 +447,15 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser(Browser* browser, |
if (!profile_ && browser) |
profile_ = browser->profile(); |
- if (!browser || !browser->is_type_tabbed()) |
- browser = new Browser(Browser::CreateParams(profile_)); |
+ if (!browser || !browser->is_type_tabbed()) { |
+ // Startup browsers are not counted as being created by a user_gesture |
+ // because of historical accident, even though the startup browser was |
+ // created in response to the user clicking on chrome. There was an |
+ // incomplete check on whether a user gesture created a window which looked |
+ // at the state of the MessageLoop. |
+ Browser::CreateParams params = Browser::CreateParams(profile_, false); |
+ browser = new Browser(params); |
+ } |
bool first_tab = true; |
ProtocolHandlerRegistry* registry = profile_ ? |