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 30 matching lines...) Expand all Loading... |
41 items_(items), | 41 items_(items), |
42 importer_host_(importer_host), | 42 importer_host_(importer_host), |
43 importer_observer_(importer_observer), | 43 importer_observer_(importer_observer), |
44 importing_(true), | 44 importing_(true), |
45 bookmarks_import_(bookmarks_import) { | 45 bookmarks_import_(bookmarks_import) { |
46 const string16 info_text = bookmarks_import ? | 46 const string16 info_text = bookmarks_import ? |
47 l10n_util::GetStringUTF16(IDS_IMPORT_BOOKMARKS) : | 47 l10n_util::GetStringUTF16(IDS_IMPORT_BOOKMARKS) : |
48 l10n_util::GetStringFUTF16(IDS_IMPORT_PROGRESS_INFO, importer_name); | 48 l10n_util::GetStringFUTF16(IDS_IMPORT_PROGRESS_INFO, importer_name); |
49 label_info_ = new views::Label(info_text); | 49 label_info_ = new views::Label(info_text); |
50 label_info_->SetMultiLine(true); | 50 label_info_->SetMultiLine(true); |
51 label_info_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 51 label_info_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
52 label_bookmarks_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 52 label_bookmarks_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
53 label_searches_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 53 label_searches_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
54 label_passwords_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 54 label_passwords_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
55 label_history_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 55 label_history_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
56 label_cookies_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 56 label_cookies_->SetHorizontalAlignment(gfx::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_owned_by_client(); | 61 state_bookmarks_->set_owned_by_client(); |
62 state_searches_->set_owned_by_client(); | 62 state_searches_->set_owned_by_client(); |
63 state_passwords_->set_owned_by_client(); | 63 state_passwords_->set_owned_by_client(); |
64 state_history_->set_owned_by_client(); | 64 state_history_->set_owned_by_client(); |
65 state_cookies_->set_owned_by_client(); | 65 state_cookies_->set_owned_by_client(); |
66 label_bookmarks_->set_owned_by_client(); | 66 label_bookmarks_->set_owned_by_client(); |
(...skipping 224 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 |