Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: chrome/browser/extensions/api/identity/identity_api.h

Issue 11882025: Move "oauth2" manifest key parsing out of Extension class. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698