Home | History | Annotate | Download | only in util
      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 #include <vector>
     12 
     13 class BrowserDistribution;
     14 
     15 namespace base {
     16 class FilePath;
     17 }
     18 
     19 namespace installer {
     20 
     21 // This function returns the install path for Chrome depending on whether its
     22 // system wide install or user specific install.
     23 // system_install: if true, the function returns system wide location
     24 //                 (ProgramFiles\Google). Otherwise it returns user specific
     25 //                 location (Document And Settings\<user>\Local Settings...)
     26 base::FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist);
     27 
     28 // Returns the path(s) to the directory that holds the user data (primary and,
     29 // if applicable to |dist|, alternate).  This is always inside a user's local
     30 // application data folder (e.g., "AppData\Local or "Local Settings\Application
     31 // Data" in %USERPROFILE%). Note that these are the defaults and do not take
     32 // into account that they can be overriden with a command line parameter.
     33 // |paths| may be empty on return, but is guaranteed not to contain empty paths
     34 // otherwise. If more than one path is returned, they are guaranteed to be
     35 // siblings.
     36 void GetChromeUserDataPaths(BrowserDistribution* dist,
     37                             std::vector<base::FilePath>* paths);
     38 
     39 // Returns the distribution corresponding to the current process's binaries.
     40 // In the case of a multi-install product, this will be the CHROME_BINARIES
     41 // distribution.
     42 BrowserDistribution* GetBinariesDistribution(bool system_install);
     43 
     44 // Returns the app guid under which the current process receives updates from
     45 // Google Update.
     46 std::wstring GetAppGuidForUpdates(bool system_install);
     47 
     48 }  // namespace installer
     49 
     50 #endif  // CHROME_INSTALLER_UTIL_HELPER_H_
     51