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/views/importer/import_progress_dialog_view.h" | 5 #include "chrome/browser/ui/views/importer/import_progress_dialog_view.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/importer/importer_host.h" | 8 #include "chrome/browser/importer/importer_host.h" |
9 #include "chrome/browser/importer/importer_observer.h" | 9 #include "chrome/browser/importer/importer_observer.h" |
10 #include "chrome/browser/importer/importer_progress_dialog.h" | 10 #include "chrome/browser/importer/importer_progress_dialog.h" |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 void ImportProgressDialogView::ImportEnded() { | 269 void ImportProgressDialogView::ImportEnded() { |
270 // This can happen because: | 270 // This can happen because: |
271 // - the import completed successfully. | 271 // - the import completed successfully. |
272 // - the import was canceled by the user. | 272 // - the import was canceled by the user. |
273 // - the user chose to skip the import because they didn't want to shut down | 273 // - the user chose to skip the import because they didn't want to shut down |
274 // Firefox. | 274 // Firefox. |
275 // In every case, we need to close the UI now. | 275 // In every case, we need to close the UI now. |
276 importing_ = false; | 276 importing_ = false; |
277 importer_host_->SetObserver(NULL); | 277 importer_host_->SetObserver(NULL); |
278 window()->CloseWindow(); | 278 window()->Close(); |
279 if (importer_observer_) | 279 if (importer_observer_) |
280 importer_observer_->ImportCompleted(); | 280 importer_observer_->ImportCompleted(); |
281 } | 281 } |
282 | 282 |
283 namespace importer { | 283 namespace importer { |
284 | 284 |
285 void ShowImportProgressDialog(HWND parent_window, | 285 void ShowImportProgressDialog(HWND parent_window, |
286 uint16 items, | 286 uint16 items, |
287 ImporterHost* importer_host, | 287 ImporterHost* importer_host, |
288 ImporterObserver* importer_observer, | 288 ImporterObserver* importer_observer, |
(...skipping 14 matching lines...) Expand all Loading... |
303 | 303 |
304 if (!importer_host->is_headless() && !first_run) | 304 if (!importer_host->is_headless() && !first_run) |
305 window->Show(); | 305 window->Show(); |
306 | 306 |
307 importer_host->StartImportSettings( | 307 importer_host->StartImportSettings( |
308 source_profile, target_profile, items, new ProfileWriter(target_profile), | 308 source_profile, target_profile, items, new ProfileWriter(target_profile), |
309 first_run); | 309 first_run); |
310 } | 310 } |
311 | 311 |
312 } // namespace importer | 312 } // namespace importer |
OLD | NEW |