Chromium Code Reviews| 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 f3f7fa4fd635f846a75eb19ebfb6e2a14a10fcb6..51e64b04895c8f31394533ece259989422a55935 100644 |
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| @@ -838,15 +838,9 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( |
| if (!browser || !profile_ || browser->tab_strip_model()->count() == 0) |
| return; |
| - if (HasPendingUncleanExit(browser->profile())) { |
| - // Can't use command_line_ here because command_line_ isn't set to have |
| - // correct values when a profile window is opened after the browser starts |
| - // up (via profile switcher). See function FindOrCreateNewWindowForProfile. |
| - if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kEnableSessionCrashedBubble) || |
| - !ShowSessionCrashedBubble(browser)) |
| - SessionCrashedInfoBarDelegate::Create(browser); |
| - } |
| + if (HasPendingUncleanExit(browser->profile()) && |
| + !ShowSessionCrashedBubble(browser)) |
|
Alexei Svitkine (slow)
2014/05/27 16:53:10
Nit: Add {}'s
yao
2014/05/27 17:22:49
Done.
|
| + SessionCrashedInfoBarDelegate::Create(browser); |
| // The below info bars are only added to the first profile which is launched. |
| // Other profiles might be restoring the browsing sessions asynchronously, |