| 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/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 | 10 |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 scoped_refptr<ImporterHost> importer_host = new ImporterHost(); | 554 scoped_refptr<ImporterHost> importer_host = new ImporterHost(); |
| 555 FirstRunImportObserver observer; | 555 FirstRunImportObserver observer; |
| 556 | 556 |
| 557 // If |skip_first_run_ui|, we run in headless mode. This means that if | 557 // If |skip_first_run_ui|, we run in headless mode. This means that if |
| 558 // there is user action required the import is automatically canceled. | 558 // there is user action required the import is automatically canceled. |
| 559 if (skip_first_run_ui > 0) | 559 if (skip_first_run_ui > 0) |
| 560 importer_host->set_headless(); | 560 importer_host->set_headless(); |
| 561 | 561 |
| 562 StartImportingWithUI( | 562 StartImportingWithUI( |
| 563 parent_window, | 563 parent_window, |
| 564 items_to_import, | 564 static_cast<uint16>(items_to_import), |
| 565 importer_host, | 565 importer_host, |
| 566 importer_host->GetSourceProfileInfoForBrowserType(browser_type), | 566 importer_host->GetSourceProfileInfoForBrowserType(browser_type), |
| 567 profile, | 567 profile, |
| 568 &observer, | 568 &observer, |
| 569 true); | 569 true); |
| 570 observer.RunLoop(); | 570 observer.RunLoop(); |
| 571 return observer.import_result(); | 571 return observer.import_result(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 // static | 574 // static |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 | 859 |
| 860 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) { | 860 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) { |
| 861 if (version > 10000) { | 861 if (version > 10000) { |
| 862 // This is a test value. We want to make sure we exercise | 862 // This is a test value. We want to make sure we exercise |
| 863 // returning this early. See EarlyReturnTest test harness. | 863 // returning this early. See EarlyReturnTest test harness. |
| 864 return Upgrade::TD_NOT_NOW; | 864 return Upgrade::TD_NOT_NOW; |
| 865 } | 865 } |
| 866 TryChromeDialog td(version); | 866 TryChromeDialog td(version); |
| 867 return td.ShowModal(); | 867 return td.ShowModal(); |
| 868 } | 868 } |
| OLD | NEW |