summaryrefslogtreecommitdiffstats
path: root/chrome_elf/breakpad.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-21 03:21:33 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-21 03:21:33 +0000
commit69ca7520bdc21639d7abf41928c92e8c06d31923 (patch)
treea6f7d8c4e6ca8c201878d50c44d87568e98be58c /chrome_elf/breakpad.cc
parent7b4bff53c5278de18e6e565743aabee1e1a5bcbe (diff)
downloadchromium_src-69ca7520bdc21639d7abf41928c92e8c06d31923.zip
chromium_src-69ca7520bdc21639d7abf41928c92e8c06d31923.tar.gz
chromium_src-69ca7520bdc21639d7abf41928c92e8c06d31923.tar.bz2
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
Diffstat (limited to 'chrome_elf/breakpad.cc')
-rw-r--r--chrome_elf/breakpad.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome_elf/breakpad.cc b/chrome_elf/breakpad.cc
index 17ddc8f..4c20324 100644
--- a/chrome_elf/breakpad.cc
+++ b/chrome_elf/breakpad.cc
@@ -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>