I'm writing this post from chrome. If I go to a HTTPS site after this, the public keys built into the version of chrome I'm using will be used to verify the site's signature (unless I misunderstand). Since I downloaded chrome over the internet, how could I have prevented against a man in the middle attack? For example, suppose an attacker can insert himself in the connection close to the chrome download server. He could insert fake keys into the downloading packages and then send those downstream to the users. Obviously this is very hypothetical, but from a theoretical point of view I guess what I'm asking is how can keys be distributed over an unsafe network? How do you know the person you're downloading the keys from is who they say they are without getting a key from someone else, where you face the same problem?
It's not theoretical at all. The NSA has a program called Quantum Insert that injects packets into users web sessions, and can redirect downloads to an NSA site that contains whatever the NSA chose to put in the download. It's certainly possible they could do what you're describing to a browser download.
There's a great essay on how it works at http://www.wired.com/2013/11/this-is-how-the-internet-backbone-has-been-turned-into-a-weapon/
To protect against this kind of attack, you need to make sure you're downloading the browser with https. As long as the browser you're downloading with isn't compromised, and you're connecting via https (and you check the URL you're downloading from is legit and https), then packet injection like Quantum Insert, or some other form of redirection isn't possible.
the public keys built into the version of chrome
Chrome has no internal certificate trust store. It uses the operating system's trust store. (Firefox on the other hand has its own certificate trust store.) -- But I guess if you assume a hacked version of Chrome, then anything is possible.
Since I downloaded chrome over the internet, how could I have prevented against a man in the middle attack?
Chrome downloads default to HTTPS AFAIK. So if you trusted HTTPS before, then you might as well trust it afterwards.
Also: Otherwise: Upload your Chrome installer to https://virustotal.com/ (if you still trust any HTTPS site that is.)
If you're on Windows: Check the digital signature of ChromeSetup.exe (if you still trust your OS to not lie to you there.)
If you don't trust your OS far enough to not lie to you in these respects, then you're out of luck.
I guess what I'm asking is how can keys be distributed over an unsafe network?
You can't. Trust has to start somewhere. Not if that unsafe network is your only means of communication and you don't trust anyone.