Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(930)

Unified Diff: session_manager_setup.sh

Issue 1110003: create consent file for official builds (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: session_manager_setup.sh
diff --git a/session_manager_setup.sh b/session_manager_setup.sh
index 9c8dbc6dd77ecd32aedd8b4992490ad7b4743e09..2a39d95b03bb6dbae1d2c9879378f7beaa6db598 100644
--- a/session_manager_setup.sh
+++ b/session_manager_setup.sh
@@ -67,6 +67,8 @@ touch /tmp/doing-chrome-login
CHROME_DIR="/opt/google/chrome"
CHROME="$CHROME_DIR/chrome"
COOKIE_PIPE="/tmp/cookie_pipe"
+SEND_METRICS="/etc/send_metrics"
+CONSENT_FILE="$DATA_DIR/Consent To Send Stats"
djmm 2010/03/18 19:48:53 Filename with spaces?
Chris Masone 2010/03/18 19:57:07 Yup. That's what Chrome expects.
# xdg-open is used to open downloaded files.
# It runs sensible-browser, which uses $BROWSER.
@@ -94,6 +96,15 @@ if [ -f /mnt/stateful_partition/etc/enable_chromium_coredumps ] ; then
/proc/sys/kernel/core_pattern
fi
+if [ -f "$SEND_METRICS" ]; then
+ if [ ! -f "$CONSENT_FILE" ]; then
+ # Automatically opt-in to Chrome OS stats collecting. This does
+ # not have to be a cryptographically random string, but we do need
+ # a 32 byte, printable string.
+ head -c 8 /dev/random | openssl md5 > "$CONSENT_FILE"
+ fi
+fi
+
while [ -z ${SERVER_READY} ]; do
sleep .1
done
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698