crash_sender: remove obsolete is_on_3g(), improve comment
BUG=None
TEST=`cbuildbot x86-generic-full` passed
Change-Id: I49e259d42b1edaf0fb43ee912fa99799ca87f08c
Reviewed-on: https://chromium-review.googlesource.com/200440
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/crash_reporter/crash_sender b/crash_reporter/crash_sender
index e42cb02..399258a 100755
--- a/crash_reporter/crash_sender
+++ b/crash_reporter/crash_sender
@@ -188,11 +188,6 @@
echo $((random % max))
}
-is_on_3g() {
- # See crosbug.com/3304.
- return 1
-}
-
# Check if sending a crash now does not exceed the maximum 24hr rate and
# commit to doing so, if not.
check_rate() {
@@ -500,12 +495,11 @@
rm -f -- "${base}".*
}
-# Send all crashes from the given directory.
+# Send all crashes from the given directory. This applies even when we're on a
+# 3G connection (see crosbug.com/3304 for discussion).
send_crashes() {
local dir="$1"
- # Cycle through minidumps, most recent first. That way if we're about
- # to exceed the daily rate, we send the most recent minidumps.
if [ ! -d "${dir}" ]; then
return
fi
@@ -520,7 +514,9 @@
fi
done
- # Look through all metadata (*.meta) files, if any exist.
+ # Look through all metadata (*.meta) files, oldest first. That way, the rate
+ # limit does not stall old crashes if there's a high amount of new crashes
+ # coming in.
for meta_path in $(ls -1tr "${dir}"/*.meta 2>/dev/null); do
lecho "Considering metadata ${meta_path}."
local kind=$(get_kind "${meta_path}")
@@ -550,11 +546,6 @@
continue
fi
- if is_on_3g; then
- lecho "Not sending crash reports while on 3G, saving for later."
- return 0
- fi
-
if ! is_complete_metadata "${meta_path}"; then
# This report is incomplete, so if it's old, just remove it.
local old_meta=$(${FIND} "${dir}" -mindepth 1 -name \