The camera in the Glendora coffee shop was disguised as a coat hook and attached to a wall for two days in April, say police documents reported by the legal documents Web site The Smoking Gun.
William Velasco, 25, an unemployed student, was arrested in early May by Glendora police officers who searched his home in San Dimas.
Detectives said they found "disturbing video of at least 45 female victims using the restroom, including children," on his computers. But they do not think the footage was uploaded to the Internet or otherwise distributed.
Police said Velasco would enter the bathroom hourly, remove the camera and download the videos to his laptop in his car, and then put the camera back.
Police identified him from Starbucks surveillance video showing him entering the cafe.
Velasco was charged with secretly videotaping 45 victims for sexual gratification and was freed on $50,000 bail before a June 21 court date.
2014: The Year in Music [PHOTOS]