| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 if (CheckMachineLevelInstall()) | 594 if (CheckMachineLevelInstall()) |
| 595 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; | 595 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; |
| 596 | 596 |
| 597 process_singleton.Create(); | 597 process_singleton.Create(); |
| 598 | 598 |
| 599 // Show the First Run UI if this is the first time Chrome has been run on | 599 // Show the First Run UI if this is the first time Chrome has been run on |
| 600 // this computer, or we're being compelled to do so by a command line flag. | 600 // this computer, or we're being compelled to do so by a command line flag. |
| 601 // Note that this be done _after_ the PrefService is initialized and all | 601 // Note that this be done _after_ the PrefService is initialized and all |
| 602 // preferences are registered, since some of the code that the importer | 602 // preferences are registered, since some of the code that the importer |
| 603 // touches reads preferences. | 603 // touches reads preferences. |
| 604 if (is_first_run && !first_run_ui_bypass) { | 604 if (is_first_run) { |
| 605 if (!OpenFirstRunDialog(profile, &process_singleton)) { | 605 if (!first_run_ui_bypass) { |
| 606 // The user cancelled the first run dialog box, we should exit Chrome. | 606 if (!OpenFirstRunDialog(profile, &process_singleton)) { |
| 607 return ResultCodes::NORMAL_EXIT; | 607 // The user cancelled the first run dialog box, we should exit Chrome. |
| 608 return ResultCodes::NORMAL_EXIT; |
| 609 } |
| 608 } | 610 } |
| 611 Browser::SetNewHomePagePrefs(user_prefs); |
| 609 } | 612 } |
| 610 | 613 |
| 611 // Sets things up so that if we crash from this point on, a dialog will | 614 // Sets things up so that if we crash from this point on, a dialog will |
| 612 // popup asking the user to restart chrome. It is done this late to avoid | 615 // popup asking the user to restart chrome. It is done this late to avoid |
| 613 // testing against a bunch of special cases that are taken care early on. | 616 // testing against a bunch of special cases that are taken care early on. |
| 614 PrepareRestartOnCrashEnviroment(parsed_command_line); | 617 PrepareRestartOnCrashEnviroment(parsed_command_line); |
| 615 | 618 |
| 616 #if defined(OS_WIN) | 619 #if defined(OS_WIN) |
| 617 // Initialize Winsock. | 620 // Initialize Winsock. |
| 618 net::EnsureWinsockInit(); | 621 net::EnsureWinsockInit(); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 if (metrics) | 776 if (metrics) |
| 774 metrics->Stop(); | 777 metrics->Stop(); |
| 775 | 778 |
| 776 // browser_shutdown takes care of deleting browser_process, so we need to | 779 // browser_shutdown takes care of deleting browser_process, so we need to |
| 777 // release it. | 780 // release it. |
| 778 browser_process.release(); | 781 browser_process.release(); |
| 779 browser_shutdown::Shutdown(); | 782 browser_shutdown::Shutdown(); |
| 780 | 783 |
| 781 return result_code; | 784 return result_code; |
| 782 } | 785 } |
| OLD | NEW |