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 a class that contains various method related to branding. | 5 // This file declares a class that contains various method related to branding. |
6 | 6 |
7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 }; | 47 }; |
48 | 48 |
49 virtual ~BrowserDistribution() {} | 49 virtual ~BrowserDistribution() {} |
50 | 50 |
51 static BrowserDistribution* GetDistribution(); | 51 static BrowserDistribution* GetDistribution(); |
52 | 52 |
53 static BrowserDistribution* GetSpecificDistribution(Type type); | 53 static BrowserDistribution* GetSpecificDistribution(Type type); |
54 | 54 |
55 Type GetType() const { return type_; } | 55 Type GetType() const { return type_; } |
56 | 56 |
57 virtual void DoPostUninstallOperations(const Version& version, | 57 virtual void DoPostUninstallOperations( |
58 const base::FilePath& local_data_path, | 58 const Version& version, |
59 const string16& distribution_data); | 59 const base::FilePath& local_data_path, |
| 60 const base::string16& distribution_data); |
60 | 61 |
61 // Returns the GUID to be used when registering for Active Setup. | 62 // Returns the GUID to be used when registering for Active Setup. |
62 virtual string16 GetActiveSetupGuid(); | 63 virtual base::string16 GetActiveSetupGuid(); |
63 | 64 |
64 virtual string16 GetAppGuid(); | 65 virtual base::string16 GetAppGuid(); |
65 | 66 |
66 // Returns the unsuffixed application name of this program. | 67 // Returns the unsuffixed application name of this program. |
67 // This is the base of the name registered with Default Programs on Windows. | 68 // This is the base of the name registered with Default Programs on Windows. |
68 // IMPORTANT: This should only be called by the installer which needs to make | 69 // IMPORTANT: This should only be called by the installer which needs to make |
69 // decisions on the suffixing of the upcoming install, not by external callers | 70 // decisions on the suffixing of the upcoming install, not by external callers |
70 // at run-time. | 71 // at run-time. |
71 virtual string16 GetBaseAppName(); | 72 virtual base::string16 GetBaseAppName(); |
72 | 73 |
73 // Returns the localized display name of this distribution. | 74 // Returns the localized display name of this distribution. |
74 virtual string16 GetDisplayName(); | 75 virtual base::string16 GetDisplayName(); |
75 | 76 |
76 // Returns the localized name of the shortcut identified by |shortcut_type| | 77 // Returns the localized name of the shortcut identified by |shortcut_type| |
77 // for this distribution. | 78 // for this distribution. |
78 virtual string16 GetShortcutName(ShortcutType shortcut_type); | 79 virtual base::string16 GetShortcutName(ShortcutType shortcut_type); |
79 | 80 |
80 // Returns the index of the icon for the product identified by | 81 // Returns the index of the icon for the product identified by |
81 // |shortcut_type|, inside the file specified by GetIconFilename(). | 82 // |shortcut_type|, inside the file specified by GetIconFilename(). |
82 virtual int GetIconIndex(ShortcutType shortcut_type); | 83 virtual int GetIconIndex(ShortcutType shortcut_type); |
83 | 84 |
84 // Returns the executable filename (not path) that contains the product icon. | 85 // Returns the executable filename (not path) that contains the product icon. |
85 virtual string16 GetIconFilename(); | 86 virtual base::string16 GetIconFilename(); |
86 | 87 |
87 // Returns the localized name of the subfolder in the Start Menu identified by | 88 // Returns the localized name of the subfolder in the Start Menu identified by |
88 // |subfolder_type| that this distribution should create shortcuts in. For | 89 // |subfolder_type| that this distribution should create shortcuts in. For |
89 // SUBFOLDER_CHROME this returns GetShortcutName(SHORTCUT_CHROME). | 90 // SUBFOLDER_CHROME this returns GetShortcutName(SHORTCUT_CHROME). |
90 virtual string16 GetStartMenuShortcutSubfolder(Subfolder subfolder_type); | 91 virtual base::string16 GetStartMenuShortcutSubfolder( |
| 92 Subfolder subfolder_type); |
91 | 93 |
92 // Returns the unsuffixed appid of this program. | 94 // Returns the unsuffixed appid of this program. |
93 // The AppUserModelId is a property of Windows programs. | 95 // The AppUserModelId is a property of Windows programs. |
94 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid | 96 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid |
95 // should be suffixed in all scenarios. | 97 // should be suffixed in all scenarios. |
96 virtual string16 GetBaseAppId(); | 98 virtual base::string16 GetBaseAppId(); |
97 | 99 |
98 // Returns the Browser ProgId prefix (e.g. ChromeHTML, ChromiumHTM, etc...). | 100 // Returns the Browser ProgId prefix (e.g. ChromeHTML, ChromiumHTM, etc...). |
99 // The full id is of the form |prefix|.|suffix| and is limited to a maximum | 101 // The full id is of the form |prefix|.|suffix| and is limited to a maximum |
100 // length of 39 characters including null-terminator. See | 102 // length of 39 characters including null-terminator. See |
101 // http://msdn.microsoft.com/library/aa911706.aspx for details. We define | 103 // http://msdn.microsoft.com/library/aa911706.aspx for details. We define |
102 // |suffix| as a fixed-length 26-character alphanumeric identifier, therefore | 104 // |suffix| as a fixed-length 26-character alphanumeric identifier, therefore |
103 // the return value of this function must have a maximum length of | 105 // the return value of this function must have a maximum length of |
104 // 39 - 1(null-term) - 26(|suffix|) - 1(dot separator) = 11 characters. | 106 // 39 - 1(null-term) - 26(|suffix|) - 1(dot separator) = 11 characters. |
105 virtual string16 GetBrowserProgIdPrefix(); | 107 virtual base::string16 GetBrowserProgIdPrefix(); |
106 | 108 |
107 // Returns the Browser ProgId description. | 109 // Returns the Browser ProgId description. |
108 virtual string16 GetBrowserProgIdDesc(); | 110 virtual base::string16 GetBrowserProgIdDesc(); |
109 | 111 |
110 virtual string16 GetInstallSubDir(); | 112 virtual base::string16 GetInstallSubDir(); |
111 | 113 |
112 virtual string16 GetPublisherName(); | 114 virtual base::string16 GetPublisherName(); |
113 | 115 |
114 virtual string16 GetAppDescription(); | 116 virtual base::string16 GetAppDescription(); |
115 | 117 |
116 virtual string16 GetLongAppDescription(); | 118 virtual base::string16 GetLongAppDescription(); |
117 | 119 |
118 virtual std::string GetSafeBrowsingName(); | 120 virtual std::string GetSafeBrowsingName(); |
119 | 121 |
120 virtual string16 GetStateKey(); | 122 virtual base::string16 GetStateKey(); |
121 | 123 |
122 virtual string16 GetStateMediumKey(); | 124 virtual base::string16 GetStateMediumKey(); |
123 | 125 |
124 virtual std::string GetNetworkStatsServer() const; | 126 virtual std::string GetNetworkStatsServer() const; |
125 | 127 |
126 virtual std::string GetHttpPipeliningTestServer() const; | 128 virtual std::string GetHttpPipeliningTestServer() const; |
127 | 129 |
128 #if defined(OS_WIN) | 130 #if defined(OS_WIN) |
129 virtual string16 GetDistributionData(HKEY root_key); | 131 virtual base::string16 GetDistributionData(HKEY root_key); |
130 #endif | 132 #endif |
131 | 133 |
132 virtual string16 GetUninstallLinkName(); | 134 virtual base::string16 GetUninstallLinkName(); |
133 | 135 |
134 virtual string16 GetUninstallRegPath(); | 136 virtual base::string16 GetUninstallRegPath(); |
135 | 137 |
136 virtual string16 GetVersionKey(); | 138 virtual base::string16 GetVersionKey(); |
137 | 139 |
138 // Returns an enum specifying the different ways in which this distribution | 140 // Returns an enum specifying the different ways in which this distribution |
139 // is allowed to be set as default. | 141 // is allowed to be set as default. |
140 virtual DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy(); | 142 virtual DefaultBrowserControlPolicy GetDefaultBrowserControlPolicy(); |
141 | 143 |
142 virtual bool CanCreateDesktopShortcuts(); | 144 virtual bool CanCreateDesktopShortcuts(); |
143 | 145 |
144 virtual bool GetChromeChannel(string16* channel); | 146 virtual bool GetChromeChannel(base::string16* channel); |
145 | 147 |
146 // Returns true if this distribution includes a DelegateExecute verb handler, | 148 // Returns true if this distribution includes a DelegateExecute verb handler, |
147 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is | 149 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is |
148 // non-NULL. | 150 // non-NULL. |
149 virtual bool GetCommandExecuteImplClsid(string16* handler_class_uuid); | 151 virtual bool GetCommandExecuteImplClsid(base::string16* handler_class_uuid); |
150 | 152 |
151 // Returns true if this distribution uses app_host.exe to run platform apps. | 153 // Returns true if this distribution uses app_host.exe to run platform apps. |
152 virtual bool AppHostIsSupported(); | 154 virtual bool AppHostIsSupported(); |
153 | 155 |
154 virtual void UpdateInstallStatus(bool system_install, | 156 virtual void UpdateInstallStatus(bool system_install, |
155 installer::ArchiveType archive_type, | 157 installer::ArchiveType archive_type, |
156 installer::InstallStatus install_status); | 158 installer::InstallStatus install_status); |
157 | 159 |
158 // Returns true if this distribution should set the Omaha experiment_labels | 160 // Returns true if this distribution should set the Omaha experiment_labels |
159 // registry value. | 161 // registry value. |
(...skipping 10 matching lines...) Expand all Loading... |
170 | 172 |
171 const Type type_; | 173 const Type type_; |
172 | 174 |
173 private: | 175 private: |
174 BrowserDistribution(); | 176 BrowserDistribution(); |
175 | 177 |
176 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 178 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
177 }; | 179 }; |
178 | 180 |
179 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 181 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
OLD | NEW |