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

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

Issue 2663883003: Move impl of identity.GetProfileUserInfo() extension API to its own file (Closed)
Patch Set: nit Created 3 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
Index: chrome/browser/extensions/api/identity/identity_api.cc
diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc
index 81d003ea387043f2d50c06cfc7193dc68fbf03ae..f0ee21958b983b0ce2fb58fa6c194f17f13423ab 100644
--- a/chrome/browser/extensions/api/identity/identity_api.cc
+++ b/chrome/browser/extensions/api/identity/identity_api.cc
@@ -880,28 +880,4 @@ std::string IdentityGetAuthTokenFunction::GetOAuth2ClientId() const {
return client_id;
}
-IdentityGetProfileUserInfoFunction::IdentityGetProfileUserInfoFunction() {
-}
-
-IdentityGetProfileUserInfoFunction::~IdentityGetProfileUserInfoFunction() {
-}
-
-ExtensionFunction::ResponseAction IdentityGetProfileUserInfoFunction::Run() {
- if (GetProfile()->IsOffTheRecord()) {
- return RespondNow(Error(identity_constants::kOffTheRecord));
- }
-
- AccountInfo account =
- AccountTrackerServiceFactory::GetForProfile(GetProfile())
- ->GetAccountInfo(GetPrimaryAccountId(GetProfile()));
- api::identity::ProfileUserInfo profile_user_info;
- if (extension()->permissions_data()->HasAPIPermission(
- APIPermission::kIdentityEmail)) {
- profile_user_info.email = account.email;
- profile_user_info.id = account.gaia;
- }
-
- return RespondNow(OneArgument(profile_user_info.ToValue()));
-}
-
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_api.h ('k') | chrome/browser/extensions/api/identity/identity_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698