1) You work on an open source project and an altruistic company hires you to keep working on it. This is ideal, and I've only ever seen it once (Sendmail hired a couple of core contributors to keep making Sendmail awesome back in the 90s).
2) You work on an open source project, people see the work because they use the project, and then offer you a job to keep working on the project, but slowly over time you are working less on things that are great for the community and more on things that are great for your company. I've seen this a lot.
3) You get hired by a company that uses a big project, and they ask you to start making modifications that are useful for the company. It turns out what you did was useful for everyone so you contribute it back. Sometimes it turns out to be a huge win and so you keep working on it. I saw this with Cassandra and some of the folks at Netflix.
4) You create a cool project and your company lets you open source it. It becomes well known and then other companies want to hire you for either 1, 2 or 3. I saw this a couple times were people left Netflix to go to Facebook or Google to continue work on an OSS project.
If you work on Chromium or Firefox, you'll pretty much be limited to Google or the Mozilla foundation (with some exceptions). So if you want to do it to learn some great code but don't have a particular project that you love, I'd suggest one of the more infrastructure projects that are widely deployed if you want to increase potential job prospects.
In summary: There are lots of ways to get paid to write OSS, but you may not like them all.