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 9ea079f53d99aac2954565d3968c24ca1fd45c72..bff9ad326db18499f8eabb067c42f1263fffdcfd 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
@@ -16,6 +16,7 @@ |
#include "base/environment.h" |
#include "base/lazy_instance.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/metrics/field_trial.h" |
#include "base/metrics/histogram.h" |
#include "base/metrics/statistics_recorder.h" |
#include "base/path_service.h" |
@@ -129,6 +130,11 @@ enum LaunchMode { |
LM_LINUX_MAC_BEOS // Other OS buckets start here. |
}; |
+// The Finch experiment name and group name that enables new bubble UI after |
+// session crashes. |
+const char kManagedModeFinchName[] = "EnalbeSessionCrashedBubbleUI"; |
+const char kEnalbeBubbleUIGroupEnabled[] = "Enabled"; |
+ |
#if defined(OS_WIN) |
// Undocumented flag in the startup info structure tells us what shortcut was |
// used to launch the browser. See http://www.catch22.net/tuts/undoc01 for |
@@ -845,8 +851,11 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( |
return; |
if (HasPendingUncleanExit(browser->profile())) { |
- if (!command_line_.HasSwitch(switches::kEnableSessionCrashedBubble) || |
- !ShowSessionCrashedBubble(browser)) |
+ // The new bubble UI can be enabled by Finch experiment or by flag. |
+ if (!((base::FieldTrialList::FindFullName(kManagedModeFinchName) == |
+ kEnalbeBubbleUIGroupEnabled || |
+ command_line_.HasSwitch(switches::kEnableSessionCrashedBubble)) && |
+ ShowSessionCrashedBubble(browser))) |
Alexei Svitkine (slow)
2014/05/15 19:02:35
Hmm, I think it would be better to move this logic
yao
2014/05/15 21:19:38
Done.
|
SessionCrashedInfoBarDelegate::Create(browser); |
} |