Commit 69ca7520 authored by thestig@chromium.org's avatar thestig@chromium.org

For Chrome builds, only upload crashes when the build is official.

BUG=362783

Review URL: https://codereview.chromium.org/292933002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271840 0039d316-1c4b-4281-b951-d872f2087c98
parent 7b4bff53
......@@ -331,13 +331,10 @@ bool ChromeBreakpadClient::IsRunningUnattended() {
}
bool ChromeBreakpadClient::GetCollectStatsConsent() {
// Convert #define to a variable so that we can use if() rather than
// #if below and so at least compile-test the Chrome code in
// Chromium builds.
#if defined(GOOGLE_CHROME_BUILD)
bool is_chrome_build = true;
#if defined(GOOGLE_CHROME_BUILD) && defined(OFFICIAL_BUILD)
bool is_official_chrome_build = true;
#else
bool is_chrome_build = false;
bool is_official_chrome_build = false;
#endif
#if defined(OS_CHROMEOS)
......@@ -354,9 +351,10 @@ bool ChromeBreakpadClient::GetCollectStatsConsent() {
// TODO(jcivelli): we should not initialize the crash-reporter when it was not
// enabled. Right now if it is disabled we still generate the minidumps but we
// do not upload them.
return is_chrome_build;
return is_official_chrome_build;
#else // !defined(OS_ANDROID)
return is_chrome_build && GoogleUpdateSettings::GetCollectStatsConsent();
return is_official_chrome_build &&
GoogleUpdateSettings::GetCollectStatsConsent();
#endif // defined(OS_ANDROID)
}
......
......@@ -102,7 +102,7 @@ int GenerateCrashDump(EXCEPTION_POINTERS* exinfo) {
void InitializeCrashReporting() {
wchar_t exe_path[MAX_PATH] = {};
if(!::GetModuleFileName(NULL, exe_path, arraysize(exe_path)))
if (!::GetModuleFileName(NULL, exe_path, arraysize(exe_path)))
return;
// Disable the message box for assertions.
......@@ -123,13 +123,10 @@ void InitializeCrashReporting() {
MiniDumpWithIndirectlyReferencedMemory); // Get memory referenced by
// stack.
// Convert #define to a variable so that we can use if() rather than
// #if below and so at least compile-test the Chrome code in
// Chromium builds.
#if defined(GOOGLE_CHROME_BUILD)
bool is_chrome_build = true;
#if defined(GOOGLE_CHROME_BUILD) && defined(OFFICIAL_BUILD)
bool is_official_chrome_build = true;
#else
bool is_chrome_build = false;
bool is_official_chrome_build = false;
#endif
base::string16 pipe_name;
......@@ -139,8 +136,9 @@ void InitializeCrashReporting() {
if (!use_policy && IsHeadless()) {
pipe_name = kChromePipeName;
} else if (use_policy ? enabled_by_policy :
(is_chrome_build && AreUsageStatsEnabled(exe_path))) {
} else if (use_policy ?
enabled_by_policy :
(is_official_chrome_build && AreUsageStatsEnabled(exe_path))) {
// 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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment