1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/process_singleton_dialog_linux.h"
7 #include "base/run_loop.h"
8 #include "chrome/browser/ui/simple_message_box.h"
9 #include "grit/chromium_strings.h"
10 #include "grit/generated_resources.h"
11 #include "ui/base/l10n/l10n_util.h"
13 bool ShowProcessSingletonDialog(const base::string16
& message
,
14 const base::string16
& relaunch_text
) {
15 bool result
= chrome::ShowMessageBoxWithButtonText(
17 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME
),
20 l10n_util::GetStringUTF16(IDS_PROFILE_IN_USE_LINUX_QUIT
)) ==
21 chrome::MESSAGE_BOX_RESULT_YES
;
23 // Avoids gpu_process_transport_factory.cc(153)] Check failed:
24 // per_compositor_data_.empty() when quit is chosen.
25 base::RunLoop().RunUntilIdle();