Hi, there has been some discussions on that within the chromium-extensions mailing list:
http://groups.google.com/a/chromium.org/group/chromium-extensions/browse_thread/thread/6e46a3a6e46d9110/
Basically, as a user suggested, you send an Xml Http Request to google.com, and search through regex, if a current user is signed in:
Source: Guillaume Boudreau (on chromium-extensions mailing list)
var currentUser;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(data) {
if (xhr.readyState == 4) {
currentUser = null;
if (xhr.status == 200) {
var re = new RegExp(/<b class="?gb4"?>[\s]*([^<]+@[^<]+)<\/b>/i);
var m = re.exec(xhr.responseText);
if (m && m.length == 2) {
currentUser = m[1];
}
}
console.log("Currently logged user (on google.com): " +
currentUser);
}
};
xhr.open('GET', 'https://www.google.com/', false);
xhr.send();