| Index: chrome/common/net/gaia/authentication_consumer.h
|
| diff --git a/chrome/common/net/gaia/authentication_consumer.h b/chrome/common/net/gaia/authentication_consumer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e6bd9f122d892bbbf9f5f2a06e88dc0be0c48881
|
| --- /dev/null
|
| +++ b/chrome/common/net/gaia/authentication_consumer.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_COMMON_NET_GAIA_AUTHENTICATION_CONSUMER_H_
|
| +#define CHROME_COMMON_NET_GAIA_AUTHENTICATION_CONSUMER_H_
|
| +#pragma once
|
| +
|
| +#include <string>
|
| +
|
| +class GoogleServiceAuthError;
|
| +
|
| +// An interface that defines the callbacks for objects that
|
| +// GaiaAuthFetcher can return data to.
|
| +class AuthenticationConsumer {
|
| + public:
|
| + struct AuthenticationResult {
|
| + public:
|
| + ~AuthenticationResult();
|
| +
|
| + virtual bool IsValid() const = 0;
|
| +
|
| + protected:
|
| + AuthenticationResult();
|
| +
|
| + private:
|
| + bool operator==(const AuthenticationResult &b) const;
|
| + };
|
| +
|
| + virtual ~AuthenticationConsumer() {}
|
| +
|
| + virtual void OnAuthenticationSuccess(const AuthenticationResult& result) {}
|
| + virtual void OnAuthenticationFailure(const GoogleServiceAuthError& error) {}
|
| +
|
| + virtual void OnIssueTokenSuccess(const std::string& service,
|
| + const std::string& auth_token) {}
|
| + virtual void OnIssueTokenFailure(const std::string& service,
|
| + const GoogleServiceAuthError& error) {}
|
| +
|
| + virtual void OnGetUserInfoSuccess(const std::string& key,
|
| + const std::string& value) {}
|
| + virtual void OnGetUserInfoKeyNotFound(const std::string& key) {}
|
| + virtual void OnGetUserInfoFailure(const GoogleServiceAuthError& error) {}
|
| +};
|
| +
|
| +#endif // CHROME_COMMON_NET_GAIA_AUTHENTICATION_CONSUMER_H_
|
|
|