| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_ELF_CHROME_ELF_UTIL_H_ | 5 #ifndef CHROME_ELF_CHROME_ELF_UTIL_H_ |
| 6 #define CHROME_ELF_CHROME_ELF_UTIL_H_ | 6 #define CHROME_ELF_CHROME_ELF_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 | 9 |
| 10 enum ProcessType { |
| 11 UNINITIALIZED, |
| 12 NON_BROWSER_PROCESS, |
| 13 BROWSER_PROCESS, |
| 14 }; |
| 15 |
| 10 // Returns true if |exe_path| points to a Chrome installed in an SxS | 16 // Returns true if |exe_path| points to a Chrome installed in an SxS |
| 11 // installation. | 17 // installation. |
| 12 bool IsCanary(const wchar_t* exe_path); | 18 bool IsCanary(const wchar_t* exe_path); |
| 13 | 19 |
| 14 // Returns true if |exe_path| points to a per-user level Chrome installation. | 20 // Returns true if |exe_path| points to a per-user level Chrome installation. |
| 15 bool IsSystemInstall(const wchar_t* exe_path); | 21 bool IsSystemInstall(const wchar_t* exe_path); |
| 16 | 22 |
| 17 // Returns true if current installation of Chrome is a multi-install. | 23 // Returns true if current installation of Chrome is a multi-install. |
| 18 bool IsMultiInstall(bool is_system_install); | 24 bool IsMultiInstall(bool is_system_install); |
| 19 | 25 |
| 20 // Returns true if usage stats collecting is enabled for this user. | 26 // Returns true if usage stats collecting is enabled for this user. |
| 21 bool AreUsageStatsEnabled(const wchar_t* exe_path); | 27 bool AreUsageStatsEnabled(const wchar_t* exe_path); |
| 22 | 28 |
| 23 // Returns true if a policy is in effect. |breakpad_enabled| will be set to true | 29 // Returns true if a policy is in effect. |breakpad_enabled| will be set to true |
| 24 // if stats collecting is permitted by this policy and false if not. | 30 // if stats collecting is permitted by this policy and false if not. |
| 25 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled); | 31 bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled); |
| 26 | 32 |
| 33 // Initializes |g_is_non_browser_process| which stores whether or not the |
| 34 // current process is the main browser process. |
| 35 void InitializeIsNonBrowserProcess(); |
| 36 |
| 27 // Returns true if invoked in a Chrome process other than the main browser | 37 // Returns true if invoked in a Chrome process other than the main browser |
| 28 // process. False otherwise. | 38 // process. False otherwise. |
| 29 bool IsNonBrowserProcess(); | 39 bool IsNonBrowserProcess(); |
| 30 | 40 |
| 41 extern ProcessType g_is_non_browser_process; |
| 42 |
| 31 #endif // CHROME_ELF_CHROME_ELF_UTIL_H_ | 43 #endif // CHROME_ELF_CHROME_ELF_UTIL_H_ |
| OLD | NEW |