OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_GET_PROFILE_USER_INFO_FU
NCTION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_GET_PROFILE_USER_INFO_FU
NCTION_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_GET_PROFILE_USER_INFO_FU
NCTION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_GET_PROFILE_USER_INFO_FU
NCTION_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/chrome_extension_function.h" | 8 #include "chrome/browser/extensions/chrome_extension_function.h" |
| 9 #include "components/signin/core/account_id/account_id.h" |
9 #include "extensions/browser/extension_function_histogram_value.h" | 10 #include "extensions/browser/extension_function_histogram_value.h" |
| 11 #include "services/identity/public/interfaces/identity_manager.mojom.h" |
10 | 12 |
11 namespace extensions { | 13 namespace extensions { |
12 | 14 |
13 class IdentityGetProfileUserInfoFunction | 15 class IdentityGetProfileUserInfoFunction |
14 : public ChromeUIThreadExtensionFunction { | 16 : public ChromeUIThreadExtensionFunction { |
15 public: | 17 public: |
16 DECLARE_EXTENSION_FUNCTION("identity.getProfileUserInfo", | 18 DECLARE_EXTENSION_FUNCTION("identity.getProfileUserInfo", |
17 IDENTITY_GETPROFILEUSERINFO); | 19 IDENTITY_GETPROFILEUSERINFO); |
18 | 20 |
19 IdentityGetProfileUserInfoFunction(); | 21 IdentityGetProfileUserInfoFunction(); |
20 | 22 |
21 private: | 23 private: |
22 ~IdentityGetProfileUserInfoFunction() override; | 24 ~IdentityGetProfileUserInfoFunction() override; |
| 25 void OnReceivedPrimaryAccountId(const base::Optional<AccountId>& account_id); |
23 | 26 |
24 // UIThreadExtensionFunction implementation. | 27 // UIThreadExtensionFunction implementation. |
25 ExtensionFunction::ResponseAction Run() override; | 28 ExtensionFunction::ResponseAction Run() override; |
| 29 |
| 30 identity::mojom::IdentityManagerPtr identity_manager_; |
26 }; | 31 }; |
27 | 32 |
28 } // namespace extensions | 33 } // namespace extensions |
29 | 34 |
30 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_GET_PROFILE_USER_INFO
_FUNCTION_H_ | 35 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_GET_PROFILE_USER_INFO
_FUNCTION_H_ |
OLD | NEW |