OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/importing_progress_view.h" | 5 #include "chrome/browser/views/importing_progress_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "grit/chromium_strings.h" | 8 #include "grit/chromium_strings.h" |
9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
10 #include "grit/locale_settings.h" | 10 #include "grit/locale_settings.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 layout->AddView(state_cookies_.get()); | 283 layout->AddView(state_cookies_.get()); |
284 layout->AddView(label_cookies_.get()); | 284 layout->AddView(label_cookies_.get()); |
285 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 285 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
286 } | 286 } |
287 } | 287 } |
288 | 288 |
289 //////////////////////////////////////////////////////////////////////////////// | 289 //////////////////////////////////////////////////////////////////////////////// |
290 // StartImportingWithUI | 290 // StartImportingWithUI |
291 | 291 |
292 void StartImportingWithUI(HWND parent_window, | 292 void StartImportingWithUI(HWND parent_window, |
293 int16 items, | 293 uint16 items, |
294 ImporterHost* coordinator, | 294 ImporterHost* coordinator, |
295 const ProfileInfo& source_profile, | 295 const ProfileInfo& source_profile, |
296 Profile* target_profile, | 296 Profile* target_profile, |
297 ImportObserver* observer, | 297 ImportObserver* observer, |
298 bool first_run) { | 298 bool first_run) { |
299 DCHECK(items != 0); | 299 DCHECK(items != 0); |
300 ImportingProgressView* v = new ImportingProgressView( | 300 ImportingProgressView* v = new ImportingProgressView( |
301 source_profile.description, items, coordinator, observer, parent_window, | 301 source_profile.description, items, coordinator, observer, parent_window, |
302 source_profile.browser_type == importer::BOOKMARKS_HTML); | 302 source_profile.browser_type == importer::BOOKMARKS_HTML); |
303 views::Window* window = | 303 views::Window* window = |
304 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), v); | 304 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), v); |
305 | 305 |
306 if (!coordinator->is_headless() && !first_run) | 306 if (!coordinator->is_headless() && !first_run) |
307 window->Show(); | 307 window->Show(); |
308 | 308 |
309 coordinator->StartImportSettings(source_profile, target_profile, items, | 309 coordinator->StartImportSettings(source_profile, target_profile, items, |
310 new ProfileWriter(target_profile), | 310 new ProfileWriter(target_profile), |
311 first_run); | 311 first_run); |
312 } | 312 } |
OLD | NEW |