I dunno about Google, but I've got a friend who's legal advice was "Stop working on your phd immediately" when his lawyer read the new employment contract we was being asked to sign when his company got acquired by Oracle. It took months for him to get an extremely limited exemption to the standard contract to be allowed to publish his thesis according to his phd requirements...
Close... but the problem is not Oracle, it's the USA.
In the country I come from, the master/PhD students working at a company are under a special set of contracts & laws (slightly different from the usual employment rules). Legally speaking, the company cannot forbid them to perform what is mandated for their school & necessary for their grade.