OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profile_error_dialog.h" | 5 #include "chrome/browser/ui/profile_error_dialog.h" |
6 | 6 |
7 #include "chrome/browser/platform_util.h" | 7 #include "chrome/browser/simple_message_box.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_list.h" | 9 #include "chrome/browser/ui/browser_list.h" |
10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
11 #include "grit/chromium_strings.h" | 11 #include "grit/chromium_strings.h" |
12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
14 | 14 |
15 void ShowProfileErrorDialog(int message_id) { | 15 void ShowProfileErrorDialog(int message_id) { |
16 // Parent the dialog to the current browser. During startup there may be no | 16 // Parent the dialog to the current browser. During startup there may be no |
17 // browser. | 17 // browser. |
18 Browser* browser = BrowserList::GetLastActive(); | 18 Browser* browser = BrowserList::GetLastActive(); |
19 platform_util::SimpleErrorBox( | 19 browser::ShowErrorBox( |
20 browser ? browser->window()->GetNativeHandle() : NULL, | 20 browser ? browser->window()->GetNativeHandle() : NULL, |
21 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 21 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
22 l10n_util::GetStringUTF16(message_id)); | 22 l10n_util::GetStringUTF16(message_id)); |
23 } | 23 } |
OLD | NEW |