A narrow measure that primarily targets foreigners while including some Americans can set a precedent, making broader social-media surveillance of all Americans later seem less radical than it otherwise would.

You’ve probably heard the adage about how to cook a frog. If you put a frog in a pot of hot water, it will jump out. The trick is to put it in cold water and raise the temperature slowly. Then the frog won’t notice.

Most Americans didn’t notice an item in the Federal Register the other day. It announced a plan by the Department of Homeland Security to collect social media information on American citizens, including their “handles” and even their search results.

The proposal extends existing government investigation and surveillance of individuals who go through the immigration process. That includes anybody with a work or student visa, lawful permanent residents, and persons who have sworn an oath to support and defend the United States as part of becoming a naturalized citizen.

The proposal to track the social-media activity of U.S. citizens shows just how far the surveillance state has come in the past couple of decades.

After 9/11, Congress and the Bush administration authorized sweeping new surveillance powers through the Patriot Act and executive fiat. Back then, warrantless wiretaps, demands for library records, the use of national security letters, and the like struck many people as alarming steps toward a police state, and they became the subject of endless news coverage.

Partisanship drove some of the concern, naturally. Republican presidents are assumed to be warmongering fascists who hate civil liberties until proven otherwise, and the expansion of the surveillance state conveniently confirmed that suspicion about George W. Bush. But the spike in domestic spying alarmed many small-government conservatives, too, and the concern produced occasional efforts to dial the needle back.

Scrutiny of domestic spying fell off the cliff around Jan. 20, 2009, when Barack Obama took the oath of office. But the new administration did not improve upon the old one and was even worse in some respects.

Warrantless electronic surveillance through “pen register” and “trap and trace” authorizations skyrocketed under Obama, for instance. The Democratic president also not only signed extensions of the Patriot Act, he pushed Congress to pass them and, at one point, sought an even longer extension than House Republicans were seeking.

All of this attracted less notice, less concern, and less coverage. When it did get coverage, it often appeared in the “vitamin pages” — B12, A16, etc. So domestic spying continued apace. And it did so even after Edward Snowden blew the lid off secret programs such as PRISM, through which the NSA vacuums up vast amounts of data about Internet traffic.