X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fgoogle_apis%2Fgaia%2Ffake_oauth2_token_service.cc;h=44722dd2dd3618ec9c22f3422c3d6abe01ef31cd;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=0b01404bd8735dc2fc45b8d64d4edc458ba2fceb;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/google_apis/gaia/fake_oauth2_token_service.cc b/src/google_apis/gaia/fake_oauth2_token_service.cc index 0b01404..44722dd 100644 --- a/src/google_apis/gaia/fake_oauth2_token_service.cc +++ b/src/google_apis/gaia/fake_oauth2_token_service.cc @@ -77,6 +77,18 @@ void FakeOAuth2TokenService::IssueAllTokensForAccount( } } +void FakeOAuth2TokenService::IssueErrorForAllPendingRequestsForAccount( + const std::string& account_id, + const GoogleServiceAuthError& auth_error) { + // Walk the requests and notify the callbacks. + for (std::vector::iterator it = pending_requests_.begin(); + it != pending_requests_.end(); + ++it) { + if (it->request && (account_id == it->account_id)) { + it->request->InformConsumer(auth_error, std::string(), base::Time()); + } + } +} OAuth2AccessTokenFetcher* FakeOAuth2TokenService::CreateAccessTokenFetcher( const std::string& account_id,