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 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 // machine. If yes and the current Chrome process is user level, we do not | 1383 // machine. If yes and the current Chrome process is user level, we do not |
1384 // allow the user level Chrome to run. So we notify the user and uninstall | 1384 // allow the user level Chrome to run. So we notify the user and uninstall |
1385 // user level Chrome. | 1385 // user level Chrome. |
1386 // Note this check should only happen here, after all the checks above | 1386 // Note this check should only happen here, after all the checks above |
1387 // (uninstall, resource bundle initialization, other chrome browser | 1387 // (uninstall, resource bundle initialization, other chrome browser |
1388 // processes etc). | 1388 // processes etc). |
1389 if (CheckMachineLevelInstall()) | 1389 if (CheckMachineLevelInstall()) |
1390 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; | 1390 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; |
1391 | 1391 |
1392 // Create the TranslateManager singleton. | 1392 // Create the TranslateManager singleton. |
1393 Singleton<TranslateManager>::get(); | 1393 TranslateManager::GetInstance(); |
1394 | 1394 |
1395 #if defined(OS_MACOSX) | 1395 #if defined(OS_MACOSX) |
1396 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { | 1396 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { |
1397 // Disk image installation is sort of a first-run task, so it shares the | 1397 // Disk image installation is sort of a first-run task, so it shares the |
1398 // kNoFirstRun switch. | 1398 // kNoFirstRun switch. |
1399 if (MaybeInstallFromDiskImage()) { | 1399 if (MaybeInstallFromDiskImage()) { |
1400 // The application was installed and the installed copy has been | 1400 // The application was installed and the installed copy has been |
1401 // launched. This process is now obsolete. Exit. | 1401 // launched. This process is now obsolete. Exit. |
1402 return ResultCodes::NORMAL_EXIT; | 1402 return ResultCodes::NORMAL_EXIT; |
1403 } | 1403 } |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1700 #if defined(OS_CHROMEOS) | 1700 #if defined(OS_CHROMEOS) |
1701 // To be precise, logout (browser shutdown) is not yet done, but the | 1701 // To be precise, logout (browser shutdown) is not yet done, but the |
1702 // remaining work is negligible, hence we say LogoutDone here. | 1702 // remaining work is negligible, hence we say LogoutDone here. |
1703 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1703 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1704 false); | 1704 false); |
1705 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1705 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1706 #endif | 1706 #endif |
1707 TRACE_EVENT_END("BrowserMain", 0, 0); | 1707 TRACE_EVENT_END("BrowserMain", 0, 0); |
1708 return result_code; | 1708 return result_code; |
1709 } | 1709 } |
OLD | NEW |