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/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
6 | 6 |
7 #include <shlobj.h> | 7 #include <shlobj.h> |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 ShowPostInstallEULAIfNeeded(install_prefs.get()); | 587 ShowPostInstallEULAIfNeeded(install_prefs.get()); |
588 | 588 |
589 if (!internal::CopyPrefFile(user_data_dir, master_prefs_path)) | 589 if (!internal::CopyPrefFile(user_data_dir, master_prefs_path)) |
590 return true; | 590 return true; |
591 | 591 |
592 DoDelayedInstallExtensionsIfNeeded(install_prefs.get()); | 592 DoDelayedInstallExtensionsIfNeeded(install_prefs.get()); |
593 | 593 |
594 internal::SetupMasterPrefsFromInstallPrefs(out_prefs, | 594 internal::SetupMasterPrefsFromInstallPrefs(out_prefs, |
595 install_prefs.get()); | 595 install_prefs.get()); |
596 | 596 |
| 597 // TODO(mirandac): Refactor skip-first-run-ui process into regular first run |
| 598 // import process. http://crbug.com/49647 |
| 599 // Note we are skipping all other master preferences if skip-first-run-ui |
| 600 // is *not* specified. (That is, we continue only if skipping first run ui.) |
597 if (!internal::SkipFirstRunUI(install_prefs.get())) | 601 if (!internal::SkipFirstRunUI(install_prefs.get())) |
598 return true; | 602 return true; |
599 | 603 |
600 // We need to be able to create the first run sentinel or else we cannot | 604 // We need to be able to create the first run sentinel or else we cannot |
601 // proceed because ImportSettings will launch the importer process which | 605 // proceed because ImportSettings will launch the importer process which |
602 // would end up here if the sentinel is not present. | 606 // would end up here if the sentinel is not present. |
603 if (!CreateSentinel()) | 607 if (!CreateSentinel()) |
604 return false; | 608 return false; |
605 | 609 |
606 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); | 610 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); |
607 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); | 611 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); |
608 internal::SetDefaultBrowser(install_prefs.get()); | 612 internal::SetDefaultBrowser(install_prefs.get()); |
609 | 613 |
610 return false; | 614 return false; |
611 } | 615 } |
612 | 616 |
613 } // namespace first_run | 617 } // namespace first_run |
OLD | NEW |