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 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "chrome/browser/plugin_service.h" | 49 #include "chrome/browser/plugin_service.h" |
50 #include "chrome/browser/pref_service.h" | 50 #include "chrome/browser/pref_service.h" |
51 #include "chrome/browser/pref_value_store.h" | 51 #include "chrome/browser/pref_value_store.h" |
52 #include "chrome/browser/process_singleton.h" | 52 #include "chrome/browser/process_singleton.h" |
53 #include "chrome/browser/profile.h" | 53 #include "chrome/browser/profile.h" |
54 #include "chrome/browser/profile_manager.h" | 54 #include "chrome/browser/profile_manager.h" |
55 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 55 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
56 #include "chrome/browser/search_engines/template_url_model.h" | 56 #include "chrome/browser/search_engines/template_url_model.h" |
57 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 57 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
58 #include "chrome/browser/shell_integration.h" | 58 #include "chrome/browser/shell_integration.h" |
59 #if !defined(OS_WIN) | 59 #if !defined(OS_WIN) && !defined(OS_MACOSX) |
60 #include "chrome/browser/translate/translate_manager.h" | 60 #include "chrome/browser/translate/translate_manager.h" |
61 #else | 61 #else |
62 #include "chrome/browser/translate/translate_manager2.h" | 62 #include "chrome/browser/translate/translate_manager2.h" |
63 #endif | 63 #endif |
64 #include "chrome/common/chrome_constants.h" | 64 #include "chrome/common/chrome_constants.h" |
65 #include "chrome/common/chrome_paths.h" | 65 #include "chrome/common/chrome_paths.h" |
66 #include "chrome/common/chrome_switches.h" | 66 #include "chrome/common/chrome_switches.h" |
67 #include "chrome/common/json_pref_store.h" | 67 #include "chrome/common/json_pref_store.h" |
68 #include "chrome/common/jstemplate_builder.h" | 68 #include "chrome/common/jstemplate_builder.h" |
69 #include "chrome/common/main_function_params.h" | 69 #include "chrome/common/main_function_params.h" |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 // machine. If yes and the current Chrome process is user level, we do not | 1203 // machine. If yes and the current Chrome process is user level, we do not |
1204 // allow the user level Chrome to run. So we notify the user and uninstall | 1204 // allow the user level Chrome to run. So we notify the user and uninstall |
1205 // user level Chrome. | 1205 // user level Chrome. |
1206 // Note this check should only happen here, after all the checks above | 1206 // Note this check should only happen here, after all the checks above |
1207 // (uninstall, resource bundle initialization, other chrome browser | 1207 // (uninstall, resource bundle initialization, other chrome browser |
1208 // processes etc). | 1208 // processes etc). |
1209 if (CheckMachineLevelInstall()) | 1209 if (CheckMachineLevelInstall()) |
1210 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; | 1210 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; |
1211 | 1211 |
1212 // Create the TranslateManager singleton. | 1212 // Create the TranslateManager singleton. |
1213 #if defined(OS_WIN) | 1213 #if defined(OS_WIN) || defined(OS_MACOSX) |
1214 Singleton<TranslateManager2>::get(); | 1214 Singleton<TranslateManager2>::get(); |
1215 #else | 1215 #else |
1216 Singleton<TranslateManager>::get(); | 1216 Singleton<TranslateManager>::get(); |
1217 #endif | 1217 #endif |
1218 | 1218 |
1219 #if defined(OS_MACOSX) | 1219 #if defined(OS_MACOSX) |
1220 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { | 1220 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { |
1221 // Disk image installation is sort of a first-run task, so it shares the | 1221 // Disk image installation is sort of a first-run task, so it shares the |
1222 // kNoFirstRun switch. | 1222 // kNoFirstRun switch. |
1223 if (MaybeInstallFromDiskImage()) { | 1223 if (MaybeInstallFromDiskImage()) { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 | 1441 |
1442 metrics->Stop(); | 1442 metrics->Stop(); |
1443 | 1443 |
1444 // browser_shutdown takes care of deleting browser_process, so we need to | 1444 // browser_shutdown takes care of deleting browser_process, so we need to |
1445 // release it. | 1445 // release it. |
1446 ignore_result(browser_process.release()); | 1446 ignore_result(browser_process.release()); |
1447 browser_shutdown::Shutdown(); | 1447 browser_shutdown::Shutdown(); |
1448 | 1448 |
1449 return result_code; | 1449 return result_code; |
1450 } | 1450 } |
OLD | NEW |