I use firefox, and find this function useful:
# Open a new firefox instance, with a temporary profile
function firefox_temp() {
dir=$(mktemp -d)
echo "Profile directory: ${dir}"
firefox --new-instance --profile ${dir}
echo "Cleaning up .."
rm -rf ${dir}
}
I'm not familiar with Chrome, but perhaps there is a similar "profile-directory" argument you can point to a temporary location?