In California, several factors influence the charges you receive.  For example, wobbler offenses are crimes that can be either a misdemeanor or felony, depending on the facts.
More severe drug offenses are charged as a straight felony.
Straight Drug Felonies
California Health and Safety Code § 11351 makes it a felony to possess any controlled substance with the intent to sell it. These charges could arise if police find evidence indicating you might be selling drugs.
Being found with large amounts of drugs packaged in individual baggies with scales and money lying around could lead police to believe you intended to sell the drugs in your possession.
Another common straight felony is transporting a controlled substance. California Health and Safety Code § 11352 prohibits anyone from transporting, importing, selling, furnishing, or offering to do such things. These are only a couple of felony drug crimes you could be charged with.
Felony Drug Possession
After Proposition 47 was enacted, many felony drug charges became misdemeanors. One of these was simple drug possession under California Health and Safety Code § 11350.
Although this has been downgraded to a misdemeanor, simple possession can still be a felony under varying circumstances. For example, being convicted of a previous sex crime or another felony could turn a mild offense into a significant charge.