| 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 // This file declares constants that describe specifics of a Chromium-based | |
| 6 // browser's branding and modes of installation. | |
| 7 // | |
| 8 // A browser's brand comprises all identifying markings that distinguish it from | |
| 9 // a browser produced by another party. Chromium has remnants of both the | |
| 10 // Chromium and Google Chrome brands. | |
| 11 // | |
| 12 // Each brand defines one primary install mode for the browser. A brand may | |
| 13 // additionally define one or more secondary install modes (e.g., Google | |
| 14 // Chrome's SxS mode for the canary channel). Install modes are described by | |
| 15 // compile-time instantiations of the `InstallConstants` struct in a brand's | |
| 16 // `kInstallModes` array. Index 0 of this array always describes the primary | |
| 17 // install mode. All other entries describe secondary modes, which are | |
| 18 // distinguished by an install suffix (e.g., " SxS") that appears in file and | |
| 19 // registry paths. | |
| 20 | |
| 21 #ifndef CHROME_INSTALL_STATIC_INSTALL_MODES_H_ | |
| 22 #define CHROME_INSTALL_STATIC_INSTALL_MODES_H_ | |
| 23 | |
| 24 #include <string> | |
| 25 | |
| 26 #include "chrome/install_static/install_details.h" | |
| 27 | |
| 28 // Include the brand-specific values. Each of these must define: | |
| 29 // - enum InstallConstantIndex: named indices of the brand's kInstallModes | |
| 30 // array. | |
| 31 // - NUM_INSTALL_MODES: the total numer of modes (i.e., the numer of items in | |
| 32 // kInstallModes. | |
| 33 // - kUseGoogleUpdateIntegration: true or false indicating whether or not the | |
| 34 // brand uses Chrome's integration with Google Update. Google Chrome does, | |
| 35 // while Chromium does not. | |
| 36 #if defined(GOOGLE_CHROME_BUILD) | |
| 37 #include "chrome/install_static/google_chrome_install_modes.h" | |
| 38 #else | |
| 39 #include "chrome/install_static/chromium_install_modes.h" | |
| 40 #endif | |
| 41 | |
| 42 namespace install_static { | |
| 43 | |
| 44 // The brand-specific company name to be included as a component of the install | |
| 45 // and user data directory paths. May be empty if no such dir is to be used. | |
| 46 extern const wchar_t kCompanyPathName[]; | |
| 47 | |
| 48 // The brand-specific product name to be included as a component of the install | |
| 49 // and user data directory paths. | |
| 50 extern const wchar_t kProductPathName[]; | |
| 51 | |
| 52 // The length, in characters, of kProductPathName not including the terminator. | |
| 53 extern const size_t kProductPathNameLength; | |
| 54 | |
| 55 // The GUID with which the brand's multi-install binaries are registered with | |
| 56 // Google Update. Must be empty if the brand does not integrate with Google | |
| 57 // Update. | |
| 58 extern const wchar_t kBinariesAppGuid[]; | |
| 59 | |
| 60 // The name of the registry key in which data for the brand's multi-install | |
| 61 // binaries are stored. Must be empty if the brand integrates with Google | |
| 62 // Update. | |
| 63 extern const wchar_t kBinariesPathName[]; | |
| 64 | |
| 65 // A brand's collection of install modes. | |
| 66 extern const InstallConstants kInstallModes[]; | |
| 67 | |
| 68 // The following convenience functions behave conditionally on whether or not | |
| 69 // the brand uses Chrome's integration with Google Update. For brands that do | |
| 70 // not (e.g., Chromium), they return something like "Software\Chromium" or | |
| 71 // "Software\Chromium Binaries". Otherwise, for brands that do integrate with | |
| 72 // Google Update, they return something like | |
| 73 // "Software\Google\Update\ClientState{Medium}\<guid>" where "<guid>" is either | |
| 74 // |mode|'s appguid or the brand's kBinariesAppGuid. | |
| 75 std::wstring GetClientStateKeyPath(const wchar_t* app_guid); | |
| 76 std::wstring GetBinariesClientStateKeyPath(); | |
| 77 std::wstring GetClientStateMediumKeyPath(const wchar_t* app_guid); | |
| 78 std::wstring GetBinariesClientStateMediumKeyPath(); | |
| 79 | |
| 80 } // namespace install_static | |
| 81 | |
| 82 #endif // CHROME_INSTALL_STATIC_INSTALL_MODES_H_ | |
| OLD | NEW |