| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 return ResultCodes::NORMAL_EXIT; | 1602 return ResultCodes::NORMAL_EXIT; |
| 1603 #endif | 1603 #endif |
| 1604 | 1604 |
| 1605 // Check if there is any machine level Chrome installed on the current | 1605 // Check if there is any machine level Chrome installed on the current |
| 1606 // machine. If yes and the current Chrome process is user level, we do not | 1606 // machine. If yes and the current Chrome process is user level, we do not |
| 1607 // allow the user level Chrome to run. So we notify the user and uninstall | 1607 // allow the user level Chrome to run. So we notify the user and uninstall |
| 1608 // user level Chrome. | 1608 // user level Chrome. |
| 1609 // Note this check should only happen here, after all the checks above | 1609 // Note this check should only happen here, after all the checks above |
| 1610 // (uninstall, resource bundle initialization, other chrome browser | 1610 // (uninstall, resource bundle initialization, other chrome browser |
| 1611 // processes etc). | 1611 // processes etc). |
| 1612 if (CheckMachineLevelInstall()) | 1612 // Do not allow this to occur for Chrome Frame user-to-system handoffs. |
| 1613 if (!parsed_command_line.HasSwitch(switches::kChromeFrame) && |
| 1614 CheckMachineLevelInstall()) |
| 1613 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; | 1615 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; |
| 1614 | 1616 |
| 1615 // Create the TranslateManager singleton. | 1617 // Create the TranslateManager singleton. |
| 1616 TranslateManager::GetInstance(); | 1618 TranslateManager::GetInstance(); |
| 1617 | 1619 |
| 1618 #if defined(OS_MACOSX) | 1620 #if defined(OS_MACOSX) |
| 1619 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { | 1621 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { |
| 1620 // Disk image installation is sort of a first-run task, so it shares the | 1622 // Disk image installation is sort of a first-run task, so it shares the |
| 1621 // kNoFirstRun switch. | 1623 // kNoFirstRun switch. |
| 1622 if (MaybeInstallFromDiskImage()) { | 1624 if (MaybeInstallFromDiskImage()) { |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1955 #if defined(OS_CHROMEOS) | 1957 #if defined(OS_CHROMEOS) |
| 1956 // To be precise, logout (browser shutdown) is not yet done, but the | 1958 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1957 // remaining work is negligible, hence we say LogoutDone here. | 1959 // remaining work is negligible, hence we say LogoutDone here. |
| 1958 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1960 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1959 false); | 1961 false); |
| 1960 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1962 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 1961 #endif | 1963 #endif |
| 1962 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1964 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 1963 return result_code; | 1965 return result_code; |
| 1964 } | 1966 } |
| OLD | NEW |