One cannot think about Torah in the bathroom, as per http://www.torahmusings.com/2011/08/bathroom-etiquette/ which cites Berachot 26a, Shabbat 150a, Rambam Kriat Shema 3:4. This "thinking" seems to include even "non-direct" thoughts, like simply thinking about Hashem (Chuchmas Shlomo 85, Lehoros Nosson 1:1, Tzitz Eliezer 13:1:3 as cited in note 63 on http://www.theyeshivaworld.com/news/headlines-breaking-stories/224278/halachically-speaking-halachos-regarding-the-bathroom.html ) so I would think that having Kavannah and focusing on fulfilling a mitzvah would be included in that.
When I go around to check for chametz, I include the bathrooms in my house. I hope that that is what I am supposed to do. I am also thinking actively about what I am looking for and what might count as chametz according to halacha so I can be sure my house is properly ready for the holiday.
But if so, and assuming I am keeping up my kavannah to be yotzei the mitzvah on which I made the bracha, am I "thinking Torah thoughts" in the bathroom?