Before joining Google, Barra had worked at Nuance, the company behind the Dragon speech recognition software as well as Apple's Siri. Barra has been with Google since March 2008, but now he has tendered his resignation in order to move on to Xiaomi. Xiaomi is one of the fastest growing manufacturers in China, and has recently eclipsed Apple's sales in the country. Xiaomi is often called the "Apple of China."
Barra's departure will leave a big hole to fill at Google. A company as large as Google likely has a succession plan in place, but a move like this is very different from the controlled and planned swap of Andy Rubin for Sundar Pichai. Google hasn't commented on the news, or its plans going forward. There is also no word on what position Barra is taking at Xiaomi.