| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // This file declares utility functions for the installer. The original reason | 5 // This file declares utility functions for the installer. The original reason | 
| 6 // for putting these functions in installer\util library is so that we can | 6 // for putting these functions in installer\util library is so that we can | 
| 7 // separate out the critical logic and write unit tests for it. | 7 // separate out the critical logic and write unit tests for it. | 
| 8 | 8 | 
| 9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 
| 10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 79   static void AddInstallerResultItems(bool system_install, | 79   static void AddInstallerResultItems(bool system_install, | 
| 80                                       const base::string16& state_key, | 80                                       const base::string16& state_key, | 
| 81                                       installer::InstallStatus status, | 81                                       installer::InstallStatus status, | 
| 82                                       int string_resource_id, | 82                                       int string_resource_id, | 
| 83                                       const base::string16* const launch_cmd, | 83                                       const base::string16* const launch_cmd, | 
| 84                                       WorkItemList* install_list); | 84                                       WorkItemList* install_list); | 
| 85 | 85 | 
| 86   // Returns true if this installation path is per user, otherwise returns false | 86   // Returns true if this installation path is per user, otherwise returns false | 
| 87   // (per machine install, meaning: the exe_path contains the path to Program | 87   // (per machine install, meaning: the exe_path contains the path to Program | 
| 88   // Files). | 88   // Files). | 
|  | 89   // TODO(grt): remove |exe_path| and consider replacing all callers with | 
|  | 90   // direct use of InstallDetails. | 
| 89   static bool IsPerUserInstall(const base::FilePath& exe_path); | 91   static bool IsPerUserInstall(const base::FilePath& exe_path); | 
| 90 | 92 | 
| 91   // Resets internal state for IsPerUserInstall so that the next call recomputes |  | 
| 92   // with fresh data. |  | 
| 93   static void ResetIsPerUserInstallForTest(); |  | 
| 94 |  | 
| 95   // Returns true if this is running setup process for Chrome SxS (as | 93   // Returns true if this is running setup process for Chrome SxS (as | 
| 96   // indicated by the presence of --chrome-sxs on the command line) or if this | 94   // indicated by the presence of --chrome-sxs on the command line) or if this | 
| 97   // is running Chrome process from the Chrome SxS installation (as indicated | 95   // is running Chrome process from the Chrome SxS installation (as indicated | 
| 98   // by either --chrome-sxs or the executable path). | 96   // by either --chrome-sxs or the executable path). | 
| 99   static bool IsChromeSxSProcess(); | 97   static bool IsChromeSxSProcess(); | 
| 100 | 98 | 
| 101   // Returns true if the sentinel file exists (or the path cannot be obtained). | 99   // Returns true if the sentinel file exists (or the path cannot be obtained). | 
| 102   static bool IsFirstRunSentinelPresent(); | 100   static bool IsFirstRunSentinelPresent(); | 
| 103 | 101 | 
| 104   // Populates |path| with EULA sentinel file path. Returns false on error. | 102   // Populates |path| with EULA sentinel file path. Returns false on error. | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 213    private: | 211    private: | 
| 214     DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 212     DISALLOW_COPY_AND_ASSIGN(ProgramCompare); | 
| 215   };  // class ProgramCompare | 213   };  // class ProgramCompare | 
| 216 | 214 | 
| 217  private: | 215  private: | 
| 218   DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 216   DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 
| 219 }; | 217 }; | 
| 220 | 218 | 
| 221 | 219 | 
| 222 #endif  // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 220 #endif  // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 
| OLD | NEW | 
|---|