Ride Madone already said alot of this.........Winterhawk56 is spreading mis-leading information. Gen 4 Glocks are NOT available to ordinary citizens in CA to purchase new from a dealer. CA has what is called a "Roster of Handguns Certified for Sale", which is a list the CA Dept of Justice has established to identify handguns that ordinary citizens can legally buy new from a dealer......provided that handgun had the mandatory "safety" features required by the state at the time of testing/approval/listing.
Every few years, the CA powers-that-be, introduce new, more stringent requirements a gun mfr must meet in order to have a gun tested and approved for sale in CA. The latest requirement is that any new semi-automatic handgun a mfr wishes to sell in CA must be capable of "microstamping" the gun's serial number on the shell casing (in two places) during the firing/ejection process. This technology does not currently exist (or at least is not feasible), and the gen 4 glocks came out AFTER this requirement was established. So, no gen 4's (or ANY new semiauto from any mfr) on the CA list. Ever. The gen 3 guns are "grandfathered" under the prior level of requirements, so they are on the list, and available new. My point to all of this is that California is a HUGE market for handguns, that is a major reason Glock still makes some of the gen 3 guns.
All that said, yes, there are ways to legally acquire a gen 4 Glock in CA....either via interfamilial transfer from a child or parent/grandparent (not siblings, cousins, etc) who is out of state (difficult), or purchasing one used from someone who is either exempt (LEO) or brought one in from out of state (which always drives a significant mark-up in used gun prices), or being a previously mentioned exempt person (again, LEO).
Ordinary CA citizens will never be able to purchase a new gen 4 from a dealer.