Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: chrome/install_static/install_util.h

Issue 2601443002: Remove multi-install from install_static. (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 contains helper functions which provide information about the 5 // This file contains helper functions which provide information about the
6 // current version of Chrome. This includes channel information, version 6 // current version of Chrome. This includes channel information, version
7 // information etc. This functionality is provided by using functions in 7 // information etc. This functionality is provided by using functions in
8 // kernel32 and advapi32. No other dependencies are allowed in this file. 8 // kernel32 and advapi32. No other dependencies are allowed in this file.
9 9
10 #ifndef CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ 10 #ifndef CHROME_INSTALL_STATIC_INSTALL_UTIL_H_
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 extern const wchar_t kProcessType[]; 46 extern const wchar_t kProcessType[];
47 extern const wchar_t kUserDataDirSwitch[]; 47 extern const wchar_t kUserDataDirSwitch[];
48 extern const wchar_t kUtilityProcess[]; 48 extern const wchar_t kUtilityProcess[];
49 49
50 // Used for suppressing warnings. 50 // Used for suppressing warnings.
51 template <typename T> inline void IgnoreUnused(T) {} 51 template <typename T> inline void IgnoreUnused(T) {}
52 52
53 // Returns true if Chrome is running at system level. 53 // Returns true if Chrome is running at system level.
54 bool IsSystemInstall(); 54 bool IsSystemInstall();
55 55
56 // Returns true if current installation of Chrome is a multi-install.
57 bool IsMultiInstall();
58
59 // Returns true if usage stats collecting is enabled for this user for the 56 // Returns true if usage stats collecting is enabled for this user for the
60 // current executable. 57 // current executable.
61 bool GetCollectStatsConsent(); 58 bool GetCollectStatsConsent();
62 59
63 // Returns true if the current executable is currently in the chosen sample that 60 // Returns true if the current executable is currently in the chosen sample that
64 // will report stats and crashes. 61 // will report stats and crashes.
65 bool GetCollectStatsInSample(); 62 bool GetCollectStatsInSample();
66 63
67 // Sets the registry value used for checking if Chrome is in the chosen sample 64 // Sets the registry value used for checking if Chrome is in the chosen sample
68 // that will report stats and crashes. Returns true if writing was successful. 65 // that will report stats and crashes. Returns true if writing was successful.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // TODO(ananta) 115 // TODO(ananta)
119 // http://crbug.com/604923 116 // http://crbug.com/604923
120 // Unify this with the Browser Distribution code. 117 // Unify this with the Browser Distribution code.
121 void GetExecutableVersionDetails(const std::wstring& exe_path, 118 void GetExecutableVersionDetails(const std::wstring& exe_path,
122 std::wstring* product_name, 119 std::wstring* product_name,
123 std::wstring* version, 120 std::wstring* version,
124 std::wstring* special_build, 121 std::wstring* special_build,
125 std::wstring* channel_name); 122 std::wstring* channel_name);
126 123
127 // Gets the channel name for the current Chrome process. 124 // Gets the channel name for the current Chrome process.
128 // If |add_modifier| is true the channel name is returned with the modifier
129 // prepended to it. Currently this is only done for multi installs, i.e (-m)
130 // is the only modifier supported.
131 // TODO(ananta) 125 // TODO(ananta)
132 // http://crbug.com/604923 126 // http://crbug.com/604923
133 // Unify this with the Browser Distribution code. 127 // Unify this with the Browser Distribution code.
128 // TODO(grt): Remove |add_modifier|.
huangs 2016/12/27 20:04:22 FYI Chromium code search shows that GetChromeChann
grt (UTC plus 2) 2017/01/02 12:58:45 TODO->Done!
134 std::wstring GetChromeChannelName(bool add_modifier); 129 std::wstring GetChromeChannelName(bool add_modifier);
135 130
136 // Returns the registry path where the browser crash dumps metrics need to be 131 // Returns the registry path where the browser crash dumps metrics need to be
137 // written to. 132 // written to.
138 // TODO(ananta) 133 // TODO(ananta)
139 // http://crbug.com/604923 134 // http://crbug.com/604923
140 // Unify this with the version in 135 // Unify this with the version in
141 // chrome\common\metrics_constants_util_win.cc 136 // chrome\common\metrics_constants_util_win.cc
142 std::wstring GetBrowserCrashDumpAttemptsRegistryPath(); 137 std::wstring GetBrowserCrashDumpAttemptsRegistryPath();
143 138
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 const std::wstring& switch_name); 172 const std::wstring& switch_name);
178 173
179 // Ensures that the given |full_path| exists, and that the tail component is a 174 // Ensures that the given |full_path| exists, and that the tail component is a
180 // directory. If the directory does not already exist, it will be created. 175 // directory. If the directory does not already exist, it will be created.
181 // Returns false if the final component exists but is not a directory, or on 176 // Returns false if the final component exists but is not a directory, or on
182 // failure to create a directory. 177 // failure to create a directory.
183 bool RecursiveDirectoryCreate(const std::wstring& full_path); 178 bool RecursiveDirectoryCreate(const std::wstring& full_path);
184 179
185 // Returns the unadorned channel name based on the channel strategy for the 180 // Returns the unadorned channel name based on the channel strategy for the
186 // install mode. 181 // install mode.
187 std::wstring DetermineChannel(const InstallConstants& mode, 182 std::wstring DetermineChannel(const InstallConstants& mode, bool system_level);
188 bool system_level,
189 bool multi_install);
190 183
191 // Caches the |ProcessType| of the current process. 184 // Caches the |ProcessType| of the current process.
192 extern ProcessType g_process_type; 185 extern ProcessType g_process_type;
193 186
194 } // namespace install_static 187 } // namespace install_static
195 188
196 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ 189 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698