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

Unified Diff: app/win_util.cc

Issue 149795: Add a command line argument to disable message boxes. This is useful to... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 | base/base_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/win_util.cc
===================================================================
--- app/win_util.cc (revision 20932)
+++ app/win_util.cc (working copy)
@@ -13,6 +13,8 @@
#include "app/l10n_util.h"
#include "app/l10n_util_win.h"
+#include "base/base_switches.h"
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/gfx/gdi_util.h"
#include "base/gfx/png_encoder.h"
@@ -795,6 +797,9 @@
const std::wstring& text,
const std::wstring& caption,
UINT flags) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoMessageBox))
+ return IDOK;
+
UINT actual_flags = flags;
if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
actual_flags |= MB_RIGHT | MB_RTLREADING;
« no previous file with comments | « no previous file | base/base_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698