Blocking a website on specific devices. Legal?

Suppose that Google is sick of Apple and their patent lawsuits and decide to kick it up a notch: They block Youtube on all i-devices. It is trivially easy to do, eg by user-agent filtering. It is also easy to circumvent, but a lot of non tech savvy users will still be affected.

Aside from that being a dick move, hurting their image, turning away customers, etc. Would that be illegal in any sense?

Remember the last time your cable company got in a snit with Viacom or Universal? So they stop airing their channels. Or the content provider stops feeding the cable company. Same kinda dick move, perfectly legal.