helper.h revision c5cede9ae108bb15f6b7a8aea21c7e1fefa2834c
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// This file contains helper functions used by setup.
6
7#ifndef CHROME_INSTALLER_UTIL_HELPER_H_
8#define CHROME_INSTALLER_UTIL_HELPER_H_
9
10#include <string>
11
12class BrowserDistribution;
13
14namespace base {
15class FilePath;
16}
17
18namespace installer {
19
20// This function returns the install path for Chrome depending on whether its
21// system wide install or user specific install.
22// system_install: if true, the function returns system wide location
23//                 (ProgramFiles\Google). Otherwise it returns user specific
24//                 location (Document And Settings\<user>\Local Settings...)
25base::FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist);
26
27// Returns the path to the directory that holds the user data.  This is always
28// inside a user's local application data folder (e.g., "AppData\Local" or
29// "Local Settings\Application Data" in %USERPROFILE%). Note that this is the
30// default user data directory and does not take into account that it can be
31// overriden with a command line parameter.
32base::FilePath GetChromeUserDataPath(BrowserDistribution* dist);
33
34// Returns the distribution corresponding to the current process's binaries.
35// In the case of a multi-install product, this will be the CHROME_BINARIES
36// distribution.
37BrowserDistribution* GetBinariesDistribution(bool system_install);
38
39// Returns the app guid under which the current process receives updates from
40// Google Update.
41std::wstring GetAppGuidForUpdates(bool system_install);
42
43}  // namespace installer
44
45#endif  // CHROME_INSTALLER_UTIL_HELPER_H_
46