summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_util_win.h
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 02:09:33 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 02:09:33 +0000
commita3abd5576efc64d117141bde14f390fd7e6c6e33 (patch)
tree5f77cfdbafd3f3b310710009d767b956320e987c /chrome/browser/browser_util_win.h
parentee1208717f1e931175c81f63a5a8ef6338091dee (diff)
downloadchromium_src-a3abd5576efc64d117141bde14f390fd7e6c6e33.zip
chromium_src-a3abd5576efc64d117141bde14f390fd7e6c6e33.tar.gz
chromium_src-a3abd5576efc64d117141bde14f390fd7e6c6e33.tar.bz2
first-run: Pull IsBrowserAlreadyRunning() out of upgrade_util_win.h.
This concept is not specific to upgrade path and thus shouldn't belong there. Move it to a new header file called browser_util_win.h as it's more appropriate. BUG=79203 TEST=None R=jhawkins@chromium.org Review URL: http://codereview.chromium.org/6861001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_util_win.h')
-rw-r--r--chrome/browser/browser_util_win.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/browser_util_win.h b/chrome/browser/browser_util_win.h
new file mode 100644
index 0000000..236c936
--- /dev/null
+++ b/chrome/browser/browser_util_win.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_BROWSER_UTIL_WIN_H_
+#define CHROME_BROWSER_BROWSER_UTIL_WIN_H_
+#pragma once
+
+namespace browser_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();
+
+} // namespace browser_util
+
+#endif // CHROME_BROWSER_BROWSER_UTIL_WIN_H_