| 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_progress_dialog_view.h" | 5 #include "chrome/browser/ui/views/importer/import_progress_dialog_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/importer/importer_host.h" | 7 #include "chrome/browser/importer/importer_host.h" |
| 8 #include "chrome/browser/importer/importer_observer.h" | 8 #include "chrome/browser/importer/importer_observer.h" |
| 9 #include "chrome/browser/importer/importer_progress_dialog.h" | 9 #include "chrome/browser/importer/importer_progress_dialog.h" |
| 10 #include "grit/chromium_strings.h" | 10 #include "grit/chromium_strings.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 label_info_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 51 label_info_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 52 label_bookmarks_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 52 label_bookmarks_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 53 label_searches_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 53 label_searches_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 54 label_passwords_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 54 label_passwords_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 55 label_history_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 55 label_history_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 56 label_cookies_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 56 label_cookies_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 57 | 57 |
| 58 importer_host_->SetObserver(this); | 58 importer_host_->SetObserver(this); |
| 59 | 59 |
| 60 // These are scoped pointers, so we don't need the parent to delete them. | 60 // These are scoped pointers, so we don't need the parent to delete them. |
| 61 state_bookmarks_->set_parent_owned(false); | 61 state_bookmarks_->set_owned_by_client(); |
| 62 state_searches_->set_parent_owned(false); | 62 state_searches_->set_owned_by_client(); |
| 63 state_passwords_->set_parent_owned(false); | 63 state_passwords_->set_owned_by_client(); |
| 64 state_history_->set_parent_owned(false); | 64 state_history_->set_owned_by_client(); |
| 65 state_cookies_->set_parent_owned(false); | 65 state_cookies_->set_owned_by_client(); |
| 66 label_bookmarks_->set_parent_owned(false); | 66 label_bookmarks_->set_owned_by_client(); |
| 67 label_searches_->set_parent_owned(false); | 67 label_searches_->set_owned_by_client(); |
| 68 label_passwords_->set_parent_owned(false); | 68 label_passwords_->set_owned_by_client(); |
| 69 label_history_->set_parent_owned(false); | 69 label_history_->set_owned_by_client(); |
| 70 label_cookies_->set_parent_owned(false); | 70 label_cookies_->set_owned_by_client(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 ImportProgressDialogView::~ImportProgressDialogView() { | 73 ImportProgressDialogView::~ImportProgressDialogView() { |
| 74 RemoveChildView(state_bookmarks_.get()); | 74 RemoveChildView(state_bookmarks_.get()); |
| 75 RemoveChildView(state_searches_.get()); | 75 RemoveChildView(state_searches_.get()); |
| 76 RemoveChildView(state_passwords_.get()); | 76 RemoveChildView(state_passwords_.get()); |
| 77 RemoveChildView(state_history_.get()); | 77 RemoveChildView(state_history_.get()); |
| 78 RemoveChildView(state_cookies_.get()); | 78 RemoveChildView(state_cookies_.get()); |
| 79 RemoveChildView(label_bookmarks_.get()); | 79 RemoveChildView(label_bookmarks_.get()); |
| 80 RemoveChildView(label_searches_.get()); | 80 RemoveChildView(label_searches_.get()); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 views::Widget* window = views::Widget::CreateWindow(progress_view); | 291 views::Widget* window = views::Widget::CreateWindow(progress_view); |
| 292 | 292 |
| 293 if (!importer_host->is_headless() && !first_run) | 293 if (!importer_host->is_headless() && !first_run) |
| 294 window->Show(); | 294 window->Show(); |
| 295 | 295 |
| 296 importer_host->StartImportSettings(source_profile, target_profile, items, | 296 importer_host->StartImportSettings(source_profile, target_profile, items, |
| 297 new ProfileWriter(target_profile), first_run); | 297 new ProfileWriter(target_profile), first_run); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace importer | 300 } // namespace importer |
| OLD | NEW |