Chromium Code Reviews| Index: chrome_elf/breakpad.cc |
| diff --git a/chrome_elf/breakpad.cc b/chrome_elf/breakpad.cc |
| index 25ca0db7e7a7635222c4588e9e69dfcaad39cf18..226ebf8df5bf664edcaa0e646231fd901cc2294c 100644 |
| --- a/chrome_elf/breakpad.cc |
| +++ b/chrome_elf/breakpad.cc |
| @@ -10,6 +10,7 @@ |
| #include <sddl.h> |
| #include "base/macros.h" |
| +#include "base/strings/string16.h" |
| #include "breakpad/src/client/windows/handler/exception_handler.h" |
| #include "chrome/common/chrome_version.h" |
| #include "chrome/install_static/install_util.h" |
| @@ -38,12 +39,13 @@ const wchar_t kSystemPrincipalSid[] = L"S-1-5-18"; |
| const wchar_t kNoErrorDialogs[] = L"noerrdialogs"; |
| google_breakpad::CustomClientInfo* GetCustomInfo() { |
| - base::string16 process = IsNonBrowserProcess() ? L"renderer" : L"browser"; |
| + base::string16 process = |
| + install_static::IsNonBrowserProcess() ? L"renderer" : L"browser"; |
| wchar_t exe_path[MAX_PATH] = {}; |
| base::string16 channel; |
| if (GetModuleFileName(NULL, exe_path, arraysize(exe_path)) && |
| - IsCanary(exe_path)) { |
| + install_static::IsSxSChrome(exe_path)) { |
| channel = L"canary"; |
| } |
| @@ -146,20 +148,22 @@ void InitializeCrashReporting() { |
| base::string16 pipe_name; |
| bool enabled_by_policy = false; |
| - bool use_policy = ReportingIsEnforcedByPolicy(&enabled_by_policy); |
| + bool use_policy = |
|
grt (UTC plus 2)
2016/05/02 22:22:06
since install_static::GetCollectStatsConsent calls
ananta
2016/05/02 22:43:27
Once chrome_elf is changed to use crashpad, we don
|
| + install_static::ReportingIsEnforcedByPolicy(&enabled_by_policy); |
| if (!use_policy && IsHeadless()) { |
| pipe_name = kChromePipeName; |
| - } else if (use_policy ? |
| - enabled_by_policy : |
| - (is_official_chrome_build && AreUsageStatsEnabled(exe_path))) { |
| + } else if (use_policy ? enabled_by_policy |
| + : (is_official_chrome_build && |
| + install_static::GetCollectStatsConsent())) { |
| // Build the pipe name. It can be one of: |
| // 32-bit system: \\.\pipe\GoogleCrashServices\S-1-5-18 |
| // 32-bit user: \\.\pipe\GoogleCrashServices\<user SID> |
| // 64-bit system: \\.\pipe\GoogleCrashServices\S-1-5-18-x64 |
| // 64-bit user: \\.\pipe\GoogleCrashServices\<user SID>-x64 |
| - base::string16 user_sid = IsSystemInstall(exe_path) ? kSystemPrincipalSid : |
| - GetUserSidString(); |
| + base::string16 user_sid = install_static::IsSystemInstall(exe_path) |
| + ? kSystemPrincipalSid |
| + : GetUserSidString(); |
| if (user_sid.empty()) |
| return; |