Index: chrome/browser/ui/views/simple_message_box_views.cc |
diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc |
index 91c219394eff2a5b098cd8d88d6deecae3c9b67b..4eee13d9bbbd578f364f10bd44db81ef41033ce1 100644 |
--- a/chrome/browser/ui/views/simple_message_box_views.cc |
+++ b/chrome/browser/ui/views/simple_message_box_views.cc |
@@ -72,9 +72,6 @@ |
DISALLOW_COPY_AND_ASSIGN(SimpleMessageBoxViews); |
}; |
- |
-// The currently showing message box, if there is one. Used for tests. |
-SimpleMessageBoxViews* g_current_message_box = nullptr; |
//////////////////////////////////////////////////////////////////////////////// |
// SimpleMessageBoxViews, public: |
@@ -115,7 +112,6 @@ |
} |
MessageBoxResult SimpleMessageBoxViews::RunDialogAndGetResult() { |
- g_current_message_box = this; |
MessageBoxResult result = MESSAGE_BOX_RESULT_NO; |
result_ = &result; |
// TODO(pkotwicz): Exit message loop when the dialog is closed by some other |
@@ -125,7 +121,6 @@ |
base::RunLoop run_loop; |
quit_runloop_ = run_loop.QuitClosure(); |
run_loop.Run(); |
- g_current_message_box = nullptr; |
return result; |
} |
@@ -252,17 +247,6 @@ |
} // namespace |
-bool CloseMessageBoxForTest(bool accept) { |
- if (!g_current_message_box) |
- return false; |
- |
- if (accept) |
- g_current_message_box->Accept(); |
- else |
- g_current_message_box->Cancel(); |
- return true; |
-} |
- |
void ShowWarningMessageBox(gfx::NativeWindow parent, |
const base::string16& title, |
const base::string16& message) { |