| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 // Contains functions for determining the product's InstallDetails at runtime. |
| 6 |
| 7 #ifndef CHROME_INSTALL_STATIC_PRODUCT_INSTALL_DETAILS_H_ |
| 8 #define CHROME_INSTALL_STATIC_PRODUCT_INSTALL_DETAILS_H_ |
| 9 |
| 10 #include <memory> |
| 11 #include <string> |
| 12 |
| 13 namespace install_static { |
| 14 |
| 15 struct InstallConstants; |
| 16 class PrimaryInstallDetails; |
| 17 |
| 18 // Creates product details for the current process and sets them as the global |
| 19 // InstallDetails for the process. |
| 20 void InitializeProductDetailsForModule(); |
| 21 |
| 22 // Returns true if |parent| is a parent of |path|. Path separators at the end of |
| 23 // |parent| are ignored. Returns false if |parent| is empty. |
| 24 bool IsPathParentOf(const wchar_t* parent, |
| 25 size_t parent_len, |
| 26 const std::wstring& path); |
| 27 |
| 28 // Returns true if |path| is within C:\Program Files{, (x86)}. |
| 29 bool PathIsInProgramFiles(const std::wstring& path); |
| 30 |
| 31 // Returns the install suffix embedded in |exe_path| or an empty string if none |
| 32 // is found. |exe_path| is expected be something similar to |
| 33 // "...\[kProductName][suffix]\Application". |
| 34 std::wstring GetInstallSuffix(const std::wstring& exe_path); |
| 35 |
| 36 // Returns true if the browser of |mode| at |system_level| is registered as |
| 37 // being multi-install. |
| 38 bool IsMultiInstall(const InstallConstants& mode, bool system_level); |
| 39 |
| 40 // Creates product details for the process at |exe_path|. |
| 41 std::unique_ptr<PrimaryInstallDetails> MakeProductDetails( |
| 42 const std::wstring& exe_path); |
| 43 |
| 44 } // namespace install_static |
| 45 |
| 46 #endif // CHROME_INSTALL_STATIC_PRODUCT_INSTALL_DETAILS_H_ |
| OLD | NEW |