What you say in public is public, whether you think so or not.
Mitt Romney's comment at a private fundraiser and Donald Sterling's private comments to his girlfriend were captured on digital devices and turned into very damaging public issues. Trying to explain away their comments by where they were uttered would be pointless and irrelevant. You said them, someone heard them and they were posted for all the world to see and hear.
The best way to avoid an embarrassing disclosure is not to say anything in an unguarded moment or outside a secure location. With smartphones everywhere and the prospect of an army of drones overhead, secure locations may be increasingly hard to find. That argues for keeping some thoughts to yourself.
If you have any illusions about keeping information or comments confidential in an open setting, get rid of them. It really is a delusion.
A better assumption to make is that everything you say is being recorded by someone — from a government spy to a teenager randomly shooting video to while away time. This assumption should chasten you to be disciplined in what you say.
Disciplined speech doesn't mean constrained, boring speech. You just need to think before you speak. You can be informative, engaging and even funny. Just not stupid or careless.