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

Unified Diff: base/logging.cc

Issue 2847085: GTTF: Ensure that when we're testing the logging system will not display dialogs. (Closed)
Patch Set: use the flag Created 10 years, 5 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: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index 851bdcc14c6e0acc3f0510e376e290c0affdc73a..09decbbaca471092ef7201cf7ebec67d887462fa 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -325,6 +325,9 @@ void DisplayDebugMessageInDialog(const std::string& str) {
if (str.empty())
return;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoErrorDialogs))
+ return;
+
#if defined(OS_WIN)
// For Windows programs, it's possible that the message loop is
// messed up on a fatal error, and creating a MessageBox will cause
« 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