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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 284113006: Enable new session crashed bubble UI by Finch experiment. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Nit Created 6 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/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);
}
« 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