| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 static void WriteInstallerResult(bool system_install, | 48 static void WriteInstallerResult(bool system_install, |
| 49 installer_util::InstallStatus status, | 49 installer_util::InstallStatus status, |
| 50 int string_resource_id, | 50 int string_resource_id, |
| 51 const std::wstring* const launch_cmd); | 51 const std::wstring* const launch_cmd); |
| 52 | 52 |
| 53 // Returns true if this installation path is per user, otherwise returns | 53 // Returns true if this installation path is per user, otherwise returns |
| 54 // false (per machine install, meaning: the exe_path contains path to | 54 // false (per machine install, meaning: the exe_path contains path to |
| 55 // Program Files). | 55 // Program Files). |
| 56 static bool IsPerUserInstall(const wchar_t* const exe_path); | 56 static bool IsPerUserInstall(const wchar_t* const exe_path); |
| 57 | 57 |
| 58 // Returns true if this is a Chrome Frame installation (as indicated by the |
| 59 // presence of --chrome-frame on the command line). |
| 60 static bool IsChromeFrameProcess(); |
| 61 |
| 58 // Adds all DLLs in install_path whose names are given by dll_names to a | 62 // Adds all DLLs in install_path whose names are given by dll_names to a |
| 59 // work item list containing registration or unregistration actions. | 63 // work item list containing registration or unregistration actions. |
| 60 // | 64 // |
| 61 // install_path: Install path containing the registrable DLLs. | 65 // install_path: Install path containing the registrable DLLs. |
| 62 // dll_names: the array of strings containing dll_names | 66 // dll_names: the array of strings containing dll_names |
| 63 // dll_names_count: the number of DLL names in dll_names | 67 // dll_names_count: the number of DLL names in dll_names |
| 64 // do_register: whether to register or unregister the DLLs | 68 // do_register: whether to register or unregister the DLLs |
| 65 // registration_list: the WorkItemList that this method populates | 69 // registration_list: the WorkItemList that this method populates |
| 66 // | 70 // |
| 67 // Returns true if at least one DLL was successfully added to | 71 // Returns true if at least one DLL was successfully added to |
| 68 // registration_list. | 72 // registration_list. |
| 69 static bool BuildDLLRegistrationList(const std::wstring& install_path, | 73 static bool BuildDLLRegistrationList(const std::wstring& install_path, |
| 70 const wchar_t** const dll_names, | 74 const wchar_t** const dll_names, |
| 71 int dll_names_count, | 75 int dll_names_count, |
| 72 bool do_register, | 76 bool do_register, |
| 73 WorkItemList* registration_list); | 77 WorkItemList* registration_list); |
| 74 | 78 |
| 75 private: | 79 private: |
| 76 DISALLOW_EVIL_CONSTRUCTORS(InstallUtil); | 80 DISALLOW_EVIL_CONSTRUCTORS(InstallUtil); |
| 77 }; | 81 }; |
| 78 | 82 |
| 79 | 83 |
| 80 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ | 84 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ |
| OLD | NEW |