It's probably pretty clear that I would prefer the legislation, with the justification that interfering with access to information by modifying search results is unethical.
In order to make that argument, it is first necessary for a body of research to support the claim that targeted search results interfere with access to information. This would not be difficult research to conduct, and I anticipate that quite a few graduate students would be interested in it as a thesis project, especially given the rise of academic interest in the causes of the increasing polarization of political and social opinion that is occurring globally. To be able to pin a significant proportion of causation on targeted search results could earn some eager young social scientist PhD a respectable name for themselves.
So, to recap:
Phase 1: Spreading the idea that targeted search results interfere with access to information.
Phase 2: Academic research to support or reject the hypothesis that targeted search results interfere with access to information.
Phase 3: Voluntary developer changes to search engine function to make targeted results clearly labeled and easily opt-outable.
Phase 4: Legislation to regulate the degree to which service providers can manipulate search results.