#ifndef CHROME_BROWSER_INVALIDATION_INVALIDATION_AUTH_PROVIDER_H_
#define CHROME_BROWSER_INVALIDATION_INVALIDATION_AUTH_PROVIDER_H_
#include <string>
#include "base/macros.h"
#include "base/observer_list.h"
class OAuth2TokenService;
namespace invalidation {
class InvalidationAuthProvider {
public:
class Observer {
public:
virtual ~Observer();
virtual void OnInvalidationAuthLogout() = 0;
};
virtual ~InvalidationAuthProvider();
virtual OAuth2TokenService* GetTokenService() = 0;
virtual std::string GetAccountId() = 0;
virtual bool ShowLoginUI() = 0;
void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer);
protected:
InvalidationAuthProvider();
void FireInvalidationAuthLogout();
private:
ObserverList<Observer, true> observers_;
DISALLOW_COPY_AND_ASSIGN(InvalidationAuthProvider);
};
}
#endif