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

Side by Side Diff: chrome/browser/first_run/upgrade_util_win.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_util_win.cc ('k') | chrome/browser/first_run/upgrade_util_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_ 5 #ifndef CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_
6 #define CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_ 6 #define CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 class CommandLine; 9 class CommandLine;
10 10
11 namespace upgrade_util { 11 namespace upgrade_util {
12 12
13 // Check if current chrome.exe is already running as a browser process by
14 // trying to create a Global event with name same as full path of chrome.exe.
15 // This method caches the handle to this event so on subsequent calls also
16 // it can first close the handle and check for any other process holding the
17 // handle to the event.
18 bool IsBrowserAlreadyRunning();
19
20 // If the new_chrome.exe exists (placed by the installer then is swapped 13 // If the new_chrome.exe exists (placed by the installer then is swapped
21 // to chrome.exe and the old chrome is renamed to old_chrome.exe. If there 14 // to chrome.exe and the old chrome is renamed to old_chrome.exe. If there
22 // is no new_chrome.exe or the swap fails the return is false; 15 // is no new_chrome.exe or the swap fails the return is false;
23 bool SwapNewChromeExeIfPresent(); 16 bool SwapNewChromeExeIfPresent();
24 17
25 // Combines the two methods, RelaunchChromeBrowser and 18 // Combines the two methods, RelaunchChromeBrowser and
26 // SwapNewChromeExeIfPresent, to perform the rename and relaunch of 19 // SwapNewChromeExeIfPresent, to perform the rename and relaunch of
27 // the browser. Note that relaunch does NOT exit the existing browser process. 20 // the browser. Note that relaunch does NOT exit the existing browser process.
28 // If this is called before message loop is executed, simply exit the main 21 // If this is called before message loop is executed, simply exit the main
29 // function. If browser is already running, you will need to exit it. 22 // function. If browser is already running, you will need to exit it.
30 bool DoUpgradeTasks(const CommandLine& command_line); 23 bool DoUpgradeTasks(const CommandLine& command_line);
31 24
32 } // namespace upgrade_util 25 } // namespace upgrade_util
33 26
34 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_ 27 #endif // CHROME_BROWSER_FIRST_RUN_UPGRADE_UTIL_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_util_win.cc ('k') | chrome/browser/first_run/upgrade_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698