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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 2685203002: Disable dev mode bubble and some infobars during remote debugging. (Closed)
Patch Set: add comment Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/extensions/extension_message_bubble_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 if (HasPendingUncleanExit(browser->profile()) && 803 if (HasPendingUncleanExit(browser->profile()) &&
804 !SessionCrashedBubble::Show(browser)) { 804 !SessionCrashedBubble::Show(browser)) {
805 #if defined(OS_MACOSX) && !BUILDFLAG(MAC_VIEWS_BROWSER) 805 #if defined(OS_MACOSX) && !BUILDFLAG(MAC_VIEWS_BROWSER)
806 SessionCrashedInfoBarDelegate::Create(browser); 806 SessionCrashedInfoBarDelegate::Create(browser);
807 #endif 807 #endif
808 } 808 }
809 809
810 // The below info bars are only added to the first profile which is launched. 810 // The below info bars are only added to the first profile which is launched.
811 // Other profiles might be restoring the browsing sessions asynchronously, 811 // Other profiles might be restoring the browsing sessions asynchronously,
812 // so we cannot add the info bars to the focused tabs here. 812 // so we cannot add the info bars to the focused tabs here.
813 //
814 // These info bars are not shown when the browser is being controlled by a
815 // test or a remote debugging client, so that they don't interfere with
816 // automated tests that assume no info bars.
813 if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP && 817 if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP &&
814 !command_line_.HasSwitch(switches::kTestType)) { 818 !command_line_.HasSwitch(switches::kTestType) &&
819 !command_line_.HasSwitch(switches::kRemoteDebuggingPort)) {
815 chrome::ShowBadFlagsPrompt(browser); 820 chrome::ShowBadFlagsPrompt(browser);
816 GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents( 821 GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents(
817 browser->tab_strip_model()->GetActiveWebContents())); 822 browser->tab_strip_model()->GetActiveWebContents()));
818 ObsoleteSystemInfoBarDelegate::Create(InfoBarService::FromWebContents( 823 ObsoleteSystemInfoBarDelegate::Create(InfoBarService::FromWebContents(
819 browser->tab_strip_model()->GetActiveWebContents())); 824 browser->tab_strip_model()->GetActiveWebContents()));
820 825
821 #if !defined(OS_CHROMEOS) 826 #if !defined(OS_CHROMEOS)
822 if (!command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) { 827 if (!command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) {
823 // Generally, the default browser prompt should not be shown on first 828 // Generally, the default browser prompt should not be shown on first
824 // run. However, when the set-as-default dialog has been suppressed, we 829 // run. However, when the set-as-default dialog has been suppressed, we
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 #if defined(OS_WIN) 1234 #if defined(OS_WIN)
1230 TriggeredProfileResetter* triggered_profile_resetter = 1235 TriggeredProfileResetter* triggered_profile_resetter =
1231 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); 1236 TriggeredProfileResetterFactory::GetForBrowserContext(profile_);
1232 // TriggeredProfileResetter instance will be nullptr for incognito profiles. 1237 // TriggeredProfileResetter instance will be nullptr for incognito profiles.
1233 if (triggered_profile_resetter) { 1238 if (triggered_profile_resetter) {
1234 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); 1239 has_reset_trigger = triggered_profile_resetter->HasResetTrigger();
1235 } 1240 }
1236 #endif // defined(OS_WIN) 1241 #endif // defined(OS_WIN)
1237 return has_reset_trigger; 1242 return has_reset_trigger;
1238 } 1243 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/extension_message_bubble_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698