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

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

Issue 2867063002: Stability instrumentation Crashpad integration (Closed)
Patch Set: merge Created 3 years, 7 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
« no previous file with comments | « chrome/install_static/install_details.cc ('k') | chrome/install_static/install_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Returns true if if usage stats reporting is controlled by a mandatory 142 // Returns true if if usage stats reporting is controlled by a mandatory
143 // policy. |crash_reporting_enabled| determines whether it's enabled (true) or 143 // policy. |crash_reporting_enabled| determines whether it's enabled (true) or
144 // disabled (false). 144 // disabled (false).
145 bool ReportingIsEnforcedByPolicy(bool* crash_reporting_enabled); 145 bool ReportingIsEnforcedByPolicy(bool* crash_reporting_enabled);
146 146
147 // Initializes |g_process_type| which stores whether or not the current 147 // Initializes |g_process_type| which stores whether or not the current
148 // process is the main browser process. 148 // process is the main browser process.
149 void InitializeProcessType(); 149 void InitializeProcessType();
150 150
151 // Returns true if the process type is initialized. False otherwise.
152 bool IsProcessTypeInitialized();
153
154 // Returns true if invoked in a Chrome process other than the main browser 151 // Returns true if invoked in a Chrome process other than the main browser
155 // process. False otherwise. 152 // process. False otherwise.
156 bool IsNonBrowserProcess(); 153 bool IsNonBrowserProcess();
157 154
158 // Returns true if the |process_type| has the rights to access the profile. 155 // Returns true if the |process_type| has the rights to access the profile.
159 // False otherwise. 156 // False otherwise.
160 bool ProcessNeedsProfileDir(const std::string& process_type); 157 bool ProcessNeedsProfileDir(const std::string& process_type);
161 158
162 // Populates |crash_dir| with the crash dump location, respecting modifications 159 // Returns true if the current process has the rights to access the profile.
163 // to user-data-dir. 160 // False otherwise.
164 // TODO(ananta) 161 bool CurrentProcessNeedsProfileDir();
165 // http://crbug.com/604923 162
166 // Unify this with the Browser Distribution code. 163 // Retrieves the user data directory, or an empty string on failure.
164 std::wstring GetUserDataDirectory();
165
166 // Retrieves an invalid user data directory specified by the user, or an empty
167 // string.
168 std::wstring GetInvalidUserDataDirectory();
169
170 // Returns the crash dump location, respecting modifications to user-data-dir,
171 // or the empty string on failure.
172 // TODO(ananta): Unify this with the Browser Distribution code.
173 // http://crbug.com/604923
167 std::wstring GetCrashDumpLocation(); 174 std::wstring GetCrashDumpLocation();
168 175
169 // Returns the contents of the specified |variable_name| from the environment 176 // Returns the contents of the specified |variable_name| from the environment
170 // block of the calling process. Returns an empty string if the variable does 177 // block of the calling process. Returns an empty string if the variable does
171 // not exist. 178 // not exist.
172 std::string GetEnvironmentString(const std::string& variable_name); 179 std::string GetEnvironmentString(const std::string& variable_name);
173 std::wstring GetEnvironmentString16(const wchar_t* variable_name); 180 std::wstring GetEnvironmentString16(const wchar_t* variable_name);
174 181
175 // Sets the environment variable identified by |variable_name| to the value 182 // Sets the environment variable identified by |variable_name| to the value
176 // identified by |new_value|. 183 // identified by |new_value|.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // key in the registry. 257 // key in the registry.
251 std::wstring DetermineChannel(const InstallConstants& mode, 258 std::wstring DetermineChannel(const InstallConstants& mode,
252 bool system_level, 259 bool system_level,
253 bool from_binaries, 260 bool from_binaries,
254 std::wstring* update_ap, 261 std::wstring* update_ap,
255 std::wstring* update_cohort_name); 262 std::wstring* update_cohort_name);
256 263
257 } // namespace install_static 264 } // namespace install_static
258 265
259 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ 266 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/install_static/install_details.cc ('k') | chrome/install_static/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698