Lines Matching defs:account_id

28 std::string AccountIdToEmail(const std::string account_id) {
29 return account_id + "@gmail.com";
32 std::string AccountIdToGaiaId(const std::string account_id) {
33 return "gaia-" + account_id;
39 const std::string& account_id,
42 account_id_(account_id),
46 const std::string& account_id)
48 account_id_(account_id),
49 gaia_id_(AccountIdToGaiaId(account_id)) {}
66 return base::StringPrintf("{ type: %s, account_id: %s, gaia: %s }",
129 events_.push_back(TrackingEvent(UPDATED, ids.account_id, ids.gaia));
134 events_.push_back(TrackingEvent(REMOVED, ids.account_id, ids.gaia));
217 void SimulateTokenAvailable(const std::string& account_id) {
218 fake_oauth2_token_service_->AddAccount(account_id);
221 void SimulateTokenRevoked(const std::string& account_id) {
222 fake_oauth2_token_service_->RemoveAccount(account_id);
226 void IssueAccessToken(const std::string& account_id) {
228 account_id, "access_token-" + account_id, base::Time::Max());
231 std::string GenerateValidTokenInfoResponse(const std::string& account_id) {
233 AccountIdToGaiaId(account_id).c_str(),
234 AccountIdToEmail(account_id).c_str());
237 void ReturnOAuthUrlFetchSuccess(const std::string& account_id);
238 void ReturnOAuthUrlFetchFailure(const std::string& account_id);
274 const std::string& account_id) {
275 IssueAccessToken(account_id);
278 GenerateValidTokenInfoResponse(account_id));
282 const std::string& account_id) {
283 IssueAccessToken(account_id);
375 EXPECT_EQ("alpha", infos[0].account_id);
378 EXPECT_EQ("beta", infos[1].account_id);
381 EXPECT_EQ("gamma", infos[2].account_id);
389 ASSERT_EQ("", info.account_id);
396 ASSERT_EQ("alpha", info.account_id);
406 ASSERT_EQ("alpha", info.account_id);
418 ASSERT_EQ("alpha", info.account_id);
423 ASSERT_EQ("", info.account_id);
433 ASSERT_EQ("alpha", info.account_id);
438 ASSERT_EQ("alpha", info.account_id);
441 ASSERT_EQ("alpha", info.account_id);
446 ASSERT_EQ("", info.account_id);
482 EXPECT_EQ("beta", infos[1].account_id);
504 EXPECT_EQ("beta", infos[0].account_id);