You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add chrome-prt function to launch Chrome with PRT features (#1156)
- Introduces a new `chrome-prt` function in the `install.sh` script to simplify launching Chrome (Stable/Dev/Canary) with Probabilistic Reveal Token (PRT) features enabled. Includes OS-specific binary detection, error handling, and temporary data directory management.
- Channel selection:
- You can explicitly choose the channel using one of:
- `chrome-prt --stable`
- `chrome-prt --dev`
- `chrome-prt --canary`
- If no channel is specified, the command auto-selects the first available in this order: Canary > Dev > Stable.
if _exists "\$chrome_stable"; then chrome_binary="\$chrome_stable"; else echo "Error: Requested Chrome Stable either not installed or not found in the system." >&2; return 1; fi;;
1178
+
dev)
1179
+
if _exists "\$chrome_dev"; then chrome_binary="\$chrome_dev"; else echo "Error: Requested Chrome Dev either not installed or not found in the system." >&2; return 1; fi;;
1180
+
canary)
1181
+
if _exists "\$chrome_canary"; then chrome_binary="\$chrome_canary"; else echo "Error: Requested Chrome Canary either not installed or not found in the system." >&2; return 1; fi;;
1182
+
esac
1183
+
else
1184
+
# Default precedence: Canary > Dev > Stable
1185
+
if _exists "\$chrome_canary"; then
1186
+
chrome_binary="\$chrome_canary"
1187
+
elif _exists "\$chrome_dev"; then
1188
+
chrome_binary="\$chrome_dev"
1189
+
elif _exists "\$chrome_stable"; then
1190
+
chrome_binary="\$chrome_stable"
1191
+
else
1192
+
echo "Error: No suitable Chrome installation found (Stable/Dev/Canary)." >&2
1193
+
return 1
1194
+
fi
1195
+
fi
1196
+
1197
+
# Create a temporary directory for user data
1198
+
local data_dir
1199
+
data_dir=\$(mktemp -d "/tmp/chrome_testing_data_dir.XXXXXXXXXX") || { echo "Error: Failed to create temporary user data directory." >&2; return 1; }
0 commit comments