What was the main food source in California during the Spanish and Mexican periods? I'm expecting it was either corn or wheat, but I don't know which.
Here's an interesting article on the topic, from the Santa Barbara Independent newspaper. It's titled, "What Did the Early Spanish Settlers Eat?" and should answer your questions:
The primary crop was wheat, in addition to significant amounts of corn, beans, barley, and peas. As the mission’s water system developed, more sophisticated irrigation techniques were possible, making for increased agricultural yields.
As Ben Crowell observed above, while the missions produced grain and legumes, the rancho economy was extremely focused on cattle production. Californios were rich in products made from leather, tallow, and beef. Meat was often wasted after slaughter, left to rot on the bone, or boiled up in tallowmaking. They had so much beef they could have made a great profit selling it to the Russians, if they had arranged better salt production. It seems safe to say that Californio households were eating their fill of beef.
Corn needs summer rain or irrigation, so it was the main cereal throughout Mexico, the Southwest and east of the Rockies. California's climate (winter rain, dry summers) was better suited for wheat and Northern California became the wheat basket for all of Spanish America (and later Mexico). As a result, wheat flour tortillas where the staple in California instead of corn. (Prior to the introduction of wheat by the Spanish, acorn flour was the staple). The flour variety was high in gluten for making bread, so the tortillas could be made large. As silverware was expensive, food was wrapped up in these large tortillas--usually a stew of beans and some kind of meat. This was lunch for the workers in the California missions. Spanish observers noted a favorite meat of the Indios was young donkey or "burrito" which, like everything else, was eaten wrapped in a flour tortilla. Field workers on California farms have been fed lunch as some form of burrito, usually incorporating the produce of that particular farm (lettuce, tomato, rice (near Sacramento), avocado (northern San Diego), etc.) for hundreds of years. This is the origin of the mission burrito in the Mission district of San Francisco. The burrito was introduced to Chihuahua from California during the Mexican Revolution in the early 20th century by the Chicanos from California and Mexican revolutionary leaders like future president Francisco Madero who had studied at Berkeley.