While the Supreme Court has recognized three exceptions to the border search doctrine (which may require a heightened suspicion for more detailed or delayed searches), the general rule is that whatever you carry with you into the U.S. you can expect to be searched and that you have tacitly agreed to such a search.
FORBES: Welcome to the U.S., We'll Take Your Laptop Now