Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: chrome/browser/browser_main.cc

Issue 7065024: Add a self-destruct mechanism to user-level Chrome Frame when it detects that system-level Chrome... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 return ResultCodes::NORMAL_EXIT; 1596 return ResultCodes::NORMAL_EXIT;
1597 #endif 1597 #endif
1598 1598
1599 // Check if there is any machine level Chrome installed on the current 1599 // Check if there is any machine level Chrome installed on the current
1600 // machine. If yes and the current Chrome process is user level, we do not 1600 // machine. If yes and the current Chrome process is user level, we do not
1601 // allow the user level Chrome to run. So we notify the user and uninstall 1601 // allow the user level Chrome to run. So we notify the user and uninstall
1602 // user level Chrome. 1602 // user level Chrome.
1603 // Note this check should only happen here, after all the checks above 1603 // Note this check should only happen here, after all the checks above
1604 // (uninstall, resource bundle initialization, other chrome browser 1604 // (uninstall, resource bundle initialization, other chrome browser
1605 // processes etc). 1605 // processes etc).
1606 if (CheckMachineLevelInstall()) 1606 // Do not allow this to occur for Chrome Frame user-to-system handoffs.
1607 if (!parsed_command_line.HasSwitch(switches::kChromeFrame) &&
1608 CheckMachineLevelInstall())
1607 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS; 1609 return ResultCodes::MACHINE_LEVEL_INSTALL_EXISTS;
1608 1610
1609 // Create the TranslateManager singleton. 1611 // Create the TranslateManager singleton.
1610 TranslateManager::GetInstance(); 1612 TranslateManager::GetInstance();
1611 1613
1612 #if defined(OS_MACOSX) 1614 #if defined(OS_MACOSX)
1613 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) { 1615 if (!parsed_command_line.HasSwitch(switches::kNoFirstRun)) {
1614 // Disk image installation is sort of a first-run task, so it shares the 1616 // Disk image installation is sort of a first-run task, so it shares the
1615 // kNoFirstRun switch. 1617 // kNoFirstRun switch.
1616 if (MaybeInstallFromDiskImage()) { 1618 if (MaybeInstallFromDiskImage()) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 #if defined(OS_CHROMEOS) 1951 #if defined(OS_CHROMEOS)
1950 // To be precise, logout (browser shutdown) is not yet done, but the 1952 // To be precise, logout (browser shutdown) is not yet done, but the
1951 // remaining work is negligible, hence we say LogoutDone here. 1953 // remaining work is negligible, hence we say LogoutDone here.
1952 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1954 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1953 false); 1955 false);
1954 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1956 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1955 #endif 1957 #endif
1956 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 1958 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
1957 return result_code; 1959 return result_code;
1958 } 1960 }
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/browser_distribution.cc » ('j') | chrome_frame/bho_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698