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

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

Issue 59073006: Do not show most startup infobars in browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 8a2b513b44a930b71b48d6dd20dad05dc78241b4..d79b3eadc830411c76bcfa9782fea2c538132b23 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -897,13 +897,11 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary(
// The below info bars are only added to the first profile which is launched.
// Other profiles might be restoring the browsing sessions asynchronously,
// so we cannot add the info bars to the focused tabs here.
- if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP) {
+ if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP &&
+ !command_line_.HasSwitch(switches::kTestType)) {
chrome::ShowBadFlagsPrompt(browser);
- if (!command_line_.HasSwitch(switches::kTestType)) {
- GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents(
- browser->tab_strip_model()->GetActiveWebContents()));
- }
-
+ GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents(
+ browser->tab_strip_model()->GetActiveWebContents()));
ObsoleteOSInfoBarDelegate::Create(InfoBarService::FromWebContents(
browser->tab_strip_model()->GetActiveWebContents()));
« 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