chrome_launcher_support.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_
6#define CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_
7
8class FilePath;
9
10namespace chrome_launcher_support {
11
12enum InstallationLevel {
13  USER_LEVEL_INSTALLATION,
14  SYSTEM_LEVEL_INSTALLATION
15};
16
17// Returns the path to an existing setup.exe at the specified level, if it can
18// be found via Omaha client state.
19FilePath GetSetupExeForInstallationLevel(InstallationLevel level);
20
21// Returns the path to an installed chrome.exe at the specified level, if it can
22// be found via Omaha client state. Prefers the installer from a multi-install,
23// but may also return that of a single-install of Chrome if no multi-install
24// exists.
25FilePath GetChromePathForInstallationLevel(InstallationLevel level);
26
27// Returns the path to an installed app_host.exe at the specified level, if
28// it can be found via Omaha client state.
29FilePath GetAppHostPathForInstallationLevel(InstallationLevel level);
30
31// Returns the path to an installed chrome.exe, or an empty path. Prefers a
32// system-level installation to a user-level installation. Uses Omaha client
33// state to identify a Chrome installation location.
34// In non-official builds, to ease development, this will first look for a
35// chrome.exe in the same directory as the current executable.
36// The file path returned (if any) is guaranteed to exist.
37FilePath GetAnyChromePath();
38
39// Returns the path to an installed app_host.exe, or an empty path. Prefers a
40// system-level installation to a user-level installation. Uses Omaha client
41// state to identify a App Host installation location.
42// In non-official builds, to ease development, this will first look for a
43// app_host.exe in the same directory as the current executable.
44// The file path returned (if any) is guaranteed to exist.
45FilePath GetAnyAppHostPath();
46
47// Returns true if App Host is installed (system-level or user-level),
48// or in the same directory as the current executable.
49bool IsAppHostPresent();
50
51}  // namespace chrome_launcher_support
52
53#endif  // CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_
54