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

Unified Diff: chrome/browser/first_run/upgrade_util_win.cc

Issue 6861001: first-run: Pull IsBrowserAlreadyRunning() out of upgrade_util_win.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/first_run/upgrade_util_win.h ('k') | chrome/browser/process_singleton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/upgrade_util_win.cc
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc
index 7789a2ed545703f53494230309a3291dde6e7549..6b71d8a7209ae684d191717a845f787173a5f772 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))
« no previous file with comments | « chrome/browser/first_run/upgrade_util_win.h ('k') | chrome/browser/process_singleton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698