diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-12 22:39:58 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-12 22:39:58 +0000 |
commit | c4334a4b0cd6b1b11b115251d8859a502a22d6db (patch) | |
tree | 082b21a77e42b7f16185ef3031254a6633c62ef1 /chrome/browser/browser_main.cc | |
parent | 603c1d0ce8f84241739005df226f5e31494dd3cd (diff) | |
download | chromium_src-c4334a4b0cd6b1b11b115251d8859a502a22d6db.zip chromium_src-c4334a4b0cd6b1b11b115251d8859a502a22d6db.tar.gz chromium_src-c4334a4b0cd6b1b11b115251d8859a502a22d6db.tar.bz2 |
* Try to rename chrome exes in shutdown path as well.
BUG=1463346
Review URL: http://codereview.chromium.org/10805
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index cbfd34a..a60be84 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -214,17 +214,6 @@ bool DoUpgradeTasks(const CommandLine& command_line) { return true; } -bool CreateUniqueChromeEvent() { - std::wstring exe; - PathService::Get(base::FILE_EXE, &exe); - std::replace(exe.begin(), exe.end(), '\\', '!'); - std::transform(exe.begin(), exe.end(), exe.begin(), tolower); - exe = L"Global\\" + exe; - HANDLE handle = CreateEvent(NULL, TRUE, TRUE, exe.c_str()); - int error = GetLastError(); - return (error == ERROR_ALREADY_EXISTS || error == ERROR_ACCESS_DENIED); -} - // Check if there is any machine level Chrome installed on the current // machine. If yes and the current Chrome process is user level, we do not // allow the user level Chrome to run. So we notify the user and uninstall @@ -290,7 +279,7 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command, const char* thread_name = thread_name_string.c_str(); PlatformThread::SetName(thread_name); main_message_loop.set_thread_name(thread_name); - bool already_running = CreateUniqueChromeEvent(); + bool already_running = Upgrade::IsBrowserAlreadyRunning(); #if defined(OS_WIN) // Make the selection of network stacks early on before any consumers try to |