| Index: chrome/browser/ui/views/importer/import_lock_dialog_view.cc
|
| diff --git a/chrome/browser/ui/views/importer/import_lock_dialog_view.cc b/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
|
| index 061fceb48ea3a6ac4271d93e229ccfcf97703c79..199e86068e32f58aa8e980a5a1a0c282ef8017a1 100644
|
| --- a/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
|
| +++ b/chrome/browser/ui/views/importer/import_lock_dialog_view.cc
|
| @@ -30,13 +30,26 @@ void ShowImportLockDialog(gfx::NativeWindow parent,
|
| content::RecordAction(UserMetricsAction("ImportLockDialogView_Shown"));
|
| }
|
|
|
| +void HideImportLockDialog() {
|
| + ImportLockDialogView::Hide();
|
| } // namespace importer
|
|
|
| +views::Widget* ImportLockDialogView::m_widget = NULL;
|
| +
|
| +// static
|
| +void ImportLockDialogView::Hide() {
|
| + if (m_widget) {
|
| + m_widget->Hide();
|
| + m_widget->CloseNow();
|
| + }
|
| +}
|
| +
|
| // static
|
| void ImportLockDialogView::Show(gfx::NativeWindow parent,
|
| const base::Callback<void(bool)>& callback) {
|
| - views::DialogDelegate::CreateDialogWidget(
|
| - new ImportLockDialogView(callback), NULL, NULL)->Show();
|
| + m_widget = views::DialogDelegate::CreateDialogWidget(
|
| + new ImportLockDialogView(callback), NULL, NULL);
|
| + m_widget->Show();
|
| }
|
|
|
| ImportLockDialogView::ImportLockDialogView(
|
|
|