Privacy vs Security Issues in Open Source

I just need to understand this. Users of Google and Microsoft are very much satisfied with the robust security that these two companies provide for all of their products. But definitely, these companies can be called anything but open source. So, how would open source assure people so far as security is concerned ? And how does open source deal with the issue of privacy ?