The "locked container (NOT the glove box, etc.)" is one of the provisions of the Federal law that permits a gun owner to transport a gun from one place in which it's legal for him to have and carry it to another placer where it's legal for him to have it. This shields you to carry it THROUGH a state where it would be otherwise illegal. If you use this law to transport a gun through California, there are a number of other provisions of the law that you need to know and comply with. For example if you spend the night with a friend or relative, you then fall under California gun laws, which are draconian to say the least. There are others.
My suggestion, Stay out of California. For a gun owner not licensed in California to try to bring a gun into the state for any reason is foolish. Add that to their unbelievable fuel prices, their tax structure, their absolutely unbelievably bad drivers and traffic jams and the terrible poor road conditions and filthy highway right of ways means that although we've been within a couple of miles of the state but have not been it for years. Your choice, but be careful.