summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r--chrome/browser/first_run/upgrade_util_win.cc16
-rw-r--r--chrome/browser/first_run/upgrade_util_win.h7
2 files changed, 0 insertions, 23 deletions
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc
index 7789a2e..6b71d8a 100644
--- a/chrome/browser/first_run/upgrade_util_win.cc
+++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -59,7 +59,6 @@ bool InvokeGoogleUpdateForRename() {
} // namespace
-
namespace upgrade_util {
bool RelaunchChromeBrowser(const CommandLine& command_line) {
@@ -76,21 +75,6 @@ bool IsUpdatePendingRestart() {
return file_util::PathExists(new_chrome_exe);
}
-bool IsBrowserAlreadyRunning() {
- static HANDLE handle = NULL;
- FilePath exe_path;
- PathService::Get(base::FILE_EXE, &exe_path);
- std::wstring exe = exe_path.value();
- std::replace(exe.begin(), exe.end(), '\\', '!');
- std::transform(exe.begin(), exe.end(), exe.begin(), tolower);
- exe = L"Global\\" + exe;
- if (handle != NULL)
- CloseHandle(handle);
- handle = CreateEvent(NULL, TRUE, TRUE, exe.c_str());
- int error = GetLastError();
- return (error == ERROR_ALREADY_EXISTS || error == ERROR_ACCESS_DENIED);
-}
-
bool SwapNewChromeExeIfPresent() {
FilePath new_chrome_exe;
if (!GetNewerChromeFile(&new_chrome_exe))
diff --git a/chrome/browser/first_run/upgrade_util_win.h b/chrome/browser/first_run/upgrade_util_win.h
index da63aaa..3bbbace 100644
--- a/chrome/browser/first_run/upgrade_util_win.h
+++ b/chrome/browser/first_run/upgrade_util_win.h
@@ -10,13 +10,6 @@ class CommandLine;
namespace upgrade_util {
-// Check if current chrome.exe is already running as a browser process by
-// trying to create a Global event with name same as full path of chrome.exe.
-// This method caches the handle to this event so on subsequent calls also
-// it can first close the handle and check for any other process holding the
-// handle to the event.
-bool IsBrowserAlreadyRunning();
-
// If the new_chrome.exe exists (placed by the installer then is swapped
// to chrome.exe and the old chrome is renamed to old_chrome.exe. If there
// is no new_chrome.exe or the swap fails the return is false;