OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/importer/import_lock_dialog_view.h" | 5 #include "chrome/browser/ui/views/importer/import_lock_dialog_view.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 ui::DialogButton button) const { | 71 ui::DialogButton button) const { |
72 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ? | 72 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ? |
73 IDS_IMPORTER_LOCK_OK : IDS_IMPORTER_LOCK_CANCEL); | 73 IDS_IMPORTER_LOCK_OK : IDS_IMPORTER_LOCK_CANCEL); |
74 } | 74 } |
75 | 75 |
76 base::string16 ImportLockDialogView::GetWindowTitle() const { | 76 base::string16 ImportLockDialogView::GetWindowTitle() const { |
77 return l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_TITLE); | 77 return l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_TITLE); |
78 } | 78 } |
79 | 79 |
80 bool ImportLockDialogView::Accept() { | 80 bool ImportLockDialogView::Accept() { |
81 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 81 base::ThreadTaskRunnerHandle::Get()->PostTask( |
82 base::Bind(callback_, true)); | 82 FROM_HERE, base::BindOnce(callback_, true)); |
83 return true; | 83 return true; |
84 } | 84 } |
85 | 85 |
86 bool ImportLockDialogView::Cancel() { | 86 bool ImportLockDialogView::Cancel() { |
87 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 87 base::ThreadTaskRunnerHandle::Get()->PostTask( |
88 base::Bind(callback_, false)); | 88 FROM_HERE, base::BindOnce(callback_, false)); |
89 return true; | 89 return true; |
90 } | 90 } |
OLD | NEW |