• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "google_apis/gaia/oauth2_access_token_fetcher.h"
6 
OAuth2AccessTokenFetcher(OAuth2AccessTokenConsumer * consumer)7 OAuth2AccessTokenFetcher::OAuth2AccessTokenFetcher(
8     OAuth2AccessTokenConsumer* consumer)
9     : consumer_(consumer) {}
10 
~OAuth2AccessTokenFetcher()11 OAuth2AccessTokenFetcher::~OAuth2AccessTokenFetcher() {}
12 
FireOnGetTokenSuccess(const std::string & access_token,const base::Time & expiration_time)13 void OAuth2AccessTokenFetcher::FireOnGetTokenSuccess(
14     const std::string& access_token,
15     const base::Time& expiration_time) {
16   consumer_->OnGetTokenSuccess(access_token, expiration_time);
17 }
18 
FireOnGetTokenFailure(const GoogleServiceAuthError & error)19 void OAuth2AccessTokenFetcher::FireOnGetTokenFailure(
20     const GoogleServiceAuthError& error) {
21   consumer_->OnGetTokenFailure(error);
22 }
23