Lines Matching refs:account_id

22 std::string ApplyAccountIdPrefix(const std::string& account_id) {
23 return kAccountIdPrefix + account_id;
30 bool IsLegacyServiceId(const std::string& account_id) {
31 return account_id.compare(0u, kAccountIdPrefixLength, kAccountIdPrefix) != 0;
47 const std::string& account_id);
85 const std::string& account_id,
88 account_id_(account_id),
115 // TODO(rogerta): when |account_id| becomes the obfuscated gaia id, this
143 const std::string& account_id) const {
144 return !GetRefreshToken(account_id).empty();
148 const std::string& account_id) const {
149 AccountInfoMap::const_iterator iter = refresh_tokens_.find(account_id);
157 const std::string& account_id,
160 std::string refresh_token = GetRefreshToken(account_id);
245 std::string account_id = RemoveAccountIdPrefix(prefixed_account_id);
246 refresh_tokens()[account_id].reset(
247 new AccountInfo(this, account_id, refresh_token));
248 FireRefreshTokenAvailable(account_id);
264 const std::string& account_id,
273 if (refresh_tokens_.count(account_id) == 0) {
280 refresh_tokens_[account_id]->SetLastAuthError(error);
293 const std::string& account_id,
296 DCHECK(!account_id.empty());
301 bool refresh_token_present = refresh_tokens_.count(account_id) > 0;
303 refresh_tokens_[account_id]->refresh_token() != refresh_token) {
313 RevokeCredentialsOnServer(refresh_tokens_[account_id]->refresh_token());
314 CancelRequestsForAccount(account_id);
315 ClearCacheForAccount(account_id);
316 refresh_tokens_[account_id]->set_refresh_token(refresh_token);
318 refresh_tokens_[account_id].reset(
319 new AccountInfo(this, account_id, refresh_token));
323 PersistCredentials(account_id, refresh_token);
325 UpdateAuthError(account_id, GoogleServiceAuthError::AuthErrorNone());
326 FireRefreshTokenAvailable(account_id);
331 const std::string& account_id) {
334 if (refresh_tokens_.count(account_id) > 0) {
336 RevokeCredentialsOnServer(refresh_tokens_[account_id]->refresh_token());
337 CancelRequestsForAccount(account_id);
338 ClearCacheForAccount(account_id);
339 refresh_tokens_.erase(account_id);
340 ClearPersistedCredentials(account_id);
341 FireRefreshTokenRevoked(account_id);
346 const std::string& account_id,
350 token_web_data->SetTokenForService(ApplyAccountIdPrefix(account_id),
356 const std::string& account_id) {
359 token_web_data->RemoveTokenForService(ApplyAccountIdPrefix(account_id));