Google won a legal ruling that allows it to keep secret from Viacom the source code central to search functions on YouTube. A federal judge ruled that the search giant doesn't have to turn over the code to Viacom, which filed a $1 billion copyright infringement lawsuit against Google in 2007.