Index: chrome/browser/extensions/api/identity/identity_api.h |
=================================================================== |
--- chrome/browser/extensions/api/identity/identity_api.h (revision 179928) |
+++ chrome/browser/extensions/api/identity/identity_api.h (working copy) |
@@ -10,6 +10,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/weak_ptr.h" |
#include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
+#include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
#include "chrome/browser/extensions/app_notify_channel_setup.h" |
#include "chrome/browser/extensions/extension_function.h" |
#include "chrome/browser/extensions/extension_install_prompt.h" |
@@ -19,6 +20,7 @@ |
class GetAuthTokenFunctionTest; |
class MockGetAuthTokenFunction; |
class GoogleServiceAuthError; |
+class Profile; |
namespace extensions { |
@@ -30,7 +32,7 @@ |
extern const char kUserRejected[]; |
extern const char kUserNotSignedIn[]; |
extern const char kInvalidRedirect[]; |
-} |
+} // namespace identity_constants |
class IdentityGetAuthTokenFunction : public AsyncExtensionFunction, |
public OAuth2MintTokenFlow::Delegate, |
@@ -46,8 +48,8 @@ |
virtual ~IdentityGetAuthTokenFunction(); |
private: |
- friend class ::GetAuthTokenFunctionTest; |
- friend class ::MockGetAuthTokenFunction; |
+ friend class GetAuthTokenFunctionTest; |
+ friend class MockGetAuthTokenFunction; |
// ExtensionFunction: |
virtual bool RunImpl() OVERRIDE; |
@@ -112,6 +114,24 @@ |
scoped_ptr<WebAuthFlow> auth_flow_; |
}; |
+class IdentityAPI : public ProfileKeyedAPI { |
+ public: |
+ explicit IdentityAPI(Profile* profile); |
+ virtual ~IdentityAPI(); |
+ |
+ // ProfileKeyedAPI implementation. |
+ static ProfileKeyedAPIFactory<IdentityAPI>* GetFactoryInstance(); |
+ |
+ private: |
+ friend class ProfileKeyedAPIFactory<IdentityAPI>; |
+ |
+ // ProfileKeyedAPI implementation. |
+ static const char* service_name() { |
+ return "IdentityAPI"; |
+ } |
+ static const bool kServiceIsNULLWhileTesting = true; |
+}; |
+ |
} // namespace extensions |
#endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |