A judge is expected to order internet giant Google to turn over some search data to the US government to help prevent access to online pornography, but he will weigh the government’s need to gather data against the privacy of Google users.