 Chromium Code Reviews
 Chromium Code Reviews Issue 2867063002:
  Stability instrumentation Crashpad integration  (Closed)
    
  
    Issue 2867063002:
  Stability instrumentation Crashpad integration  (Closed) 
  | OLD | NEW | 
|---|---|
| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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. | 151 // Returns true if the process type is initialized. False otherwise. | 
| 152 bool IsProcessTypeInitialized(); | 152 bool IsProcessTypeInitialized(); | 
| 
robertshield
2017/05/24 18:10:48
It's not clear to me that this needs to be in the
 
manzagop (departed)
2017/05/24 21:48:47
Done.
 | |
| 153 | 153 | 
| 154 // Returns true if invoked in a Chrome process other than the main browser | 154 // Returns true if invoked in a Chrome process other than the main browser | 
| 155 // process. False otherwise. | 155 // process. False otherwise. | 
| 156 bool IsNonBrowserProcess(); | 156 bool IsNonBrowserProcess(); | 
| 157 | 157 | 
| 158 // Returns true if the |process_type| has the rights to access the profile. | 158 // Returns true if the |process_type| has the rights to access the profile. | 
| 159 // False otherwise. | 159 // False otherwise. | 
| 160 bool ProcessNeedsProfileDir(const std::string& process_type); | 160 bool ProcessNeedsProfileDir(const std::string& process_type); | 
| 161 | 161 | 
| 162 // Populates |crash_dir| with the crash dump location, respecting modifications | 162 // Returns true if the current process has the rights to access the profile. | 
| 163 // to user-data-dir. | 163 // False otherwise. | 
| 164 // TODO(ananta) | 164 bool CurrentProcessNeedsProfileDir(); | 
| 165 // http://crbug.com/604923 | 165 | 
| 166 // Unify this with the Browser Distribution code. | 166 // Retrieves the user data directory, or an empty string on failure. | 
| 167 std::wstring GetUserDataDirectory(); | |
| 168 | |
| 169 // Retrieves an invalid user data directory specified by the user, or an empty | |
| 170 // string. | |
| 171 std::wstring GetInvalidUserDataDirectory(); | |
| 172 | |
| 173 // Returns the crash dump location, respecting modifications to user-data-dir, | |
| 174 // or the empty string on failure. | |
| 175 // TODO(ananta): Unify this with the Browser Distribution code. | |
| 176 // http://crbug.com/604923 | |
| 167 std::wstring GetCrashDumpLocation(); | 177 std::wstring GetCrashDumpLocation(); | 
| 168 | 178 | 
| 169 // Returns the contents of the specified |variable_name| from the environment | 179 // 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 | 180 // block of the calling process. Returns an empty string if the variable does | 
| 171 // not exist. | 181 // not exist. | 
| 172 std::string GetEnvironmentString(const std::string& variable_name); | 182 std::string GetEnvironmentString(const std::string& variable_name); | 
| 173 std::wstring GetEnvironmentString16(const wchar_t* variable_name); | 183 std::wstring GetEnvironmentString16(const wchar_t* variable_name); | 
| 174 | 184 | 
| 175 // Sets the environment variable identified by |variable_name| to the value | 185 // Sets the environment variable identified by |variable_name| to the value | 
| 176 // identified by |new_value|. | 186 // identified by |new_value|. | 
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 // key in the registry. | 260 // key in the registry. | 
| 251 std::wstring DetermineChannel(const InstallConstants& mode, | 261 std::wstring DetermineChannel(const InstallConstants& mode, | 
| 252 bool system_level, | 262 bool system_level, | 
| 253 bool from_binaries, | 263 bool from_binaries, | 
| 254 std::wstring* update_ap, | 264 std::wstring* update_ap, | 
| 255 std::wstring* update_cohort_name); | 265 std::wstring* update_cohort_name); | 
| 256 | 266 | 
| 257 } // namespace install_static | 267 } // namespace install_static | 
| 258 | 268 | 
| 259 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 269 #endif // CHROME_INSTALL_STATIC_INSTALL_UTIL_H_ | 
| OLD | NEW |