Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / google_apis / gaia / gaia_auth_util.h
index 354d116..68f75b5 100644 (file)
@@ -6,6 +6,7 @@
 #define GOOGLE_APIS_GAIA_GAIA_AUTH_UTIL_H_
 
 #include <string>
+#include <utility>
 #include <vector>
 
 class GURL;
@@ -35,9 +36,13 @@ std::string ExtractDomainName(const std::string& email);
 
 bool IsGaiaSignonRealm(const GURL& url);
 
-// Parses JSON data returned by /ListAccounts call, returns vector of
-// accounts (email addresses).
-std::vector<std::string> ParseListAccountsData(const std::string& data);
+// Parses JSON data returned by /ListAccounts call, returning a vector of
+// email/valid pairs.  An email addresses is considered valid if a passive
+// login would succeed (i.e. the user does not need to reauthenticate).
+// If there an error parsing the JSON, then false is returned.
+bool ParseListAccountsData(
+    const std::string& data,
+    std::vector<std::pair<std::string, bool> >* accounts);
 
 }  // namespace gaia