| 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/hi_res_timer_manager.h" | 9 #include "app/hi_res_timer_manager.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 // allow the user level Chrome to run. So we notify the user and uninstall | 817 // allow the user level Chrome to run. So we notify the user and uninstall |
| 818 // user level Chrome. | 818 // user level Chrome. |
| 819 // Note this check should only happen here, after all the checks above | 819 // Note this check should only happen here, after all the checks above |
| 820 // (uninstall, resource bundle initialization, other chrome browser | 820 // (uninstall, resource bundle initialization, other chrome browser |
| 821 // processes etc). | 821 // processes etc). |
| 822 if (CheckMachineLevelInstall()) | 822 if (CheckMachineLevelInstall()) |
| 823 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; | 823 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; |
| 824 | 824 |
| 825 process_singleton.Create(); | 825 process_singleton.Create(); |
| 826 | 826 |
| 827 #if defined(OS_WIN) | 827 #if !defined(OS_LINUX) |
| 828 // Create the TranslateManager singleton. | 828 // Create the TranslateManager singleton. |
| 829 // TODO(jcampan): enable on non Windows platforms when the info-bars are | 829 // TODO(jcampan): enable on Linux when the info-bars are implemented. |
| 830 // implemented. | 830 // http://crbug.com/36714 |
| 831 Singleton<TranslateManager>::get(); | 831 Singleton<TranslateManager>::get(); |
| 832 #endif | 832 #endif // !OS_LINUX |
| 833 | 833 |
| 834 // Show the First Run UI if this is the first time Chrome has been run on | 834 // Show the First Run UI if this is the first time Chrome has been run on |
| 835 // this computer, or we're being compelled to do so by a command line flag. | 835 // this computer, or we're being compelled to do so by a command line flag. |
| 836 // Note that this be done _after_ the PrefService is initialized and all | 836 // Note that this be done _after_ the PrefService is initialized and all |
| 837 // preferences are registered, since some of the code that the importer | 837 // preferences are registered, since some of the code that the importer |
| 838 // touches reads preferences. | 838 // touches reads preferences. |
| 839 if (is_first_run) { | 839 if (is_first_run) { |
| 840 if (!first_run_ui_bypass) { | 840 if (!first_run_ui_bypass) { |
| 841 if (!OpenFirstRunDialog(profile, homepage_defined, import_items, | 841 if (!OpenFirstRunDialog(profile, homepage_defined, import_items, |
| 842 dont_import_items, &process_singleton)) { | 842 dont_import_items, &process_singleton)) { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 if (metrics) | 1012 if (metrics) |
| 1013 metrics->Stop(); | 1013 metrics->Stop(); |
| 1014 | 1014 |
| 1015 // browser_shutdown takes care of deleting browser_process, so we need to | 1015 // browser_shutdown takes care of deleting browser_process, so we need to |
| 1016 // release it. | 1016 // release it. |
| 1017 browser_process.release(); | 1017 browser_process.release(); |
| 1018 browser_shutdown::Shutdown(); | 1018 browser_shutdown::Shutdown(); |
| 1019 | 1019 |
| 1020 return result_code; | 1020 return result_code; |
| 1021 } | 1021 } |
| OLD | NEW |