| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 DECLARE_EXTENSION_FUNCTION("usersPrivate.isCurrentUserOwner", | 82 DECLARE_EXTENSION_FUNCTION("usersPrivate.isCurrentUserOwner", |
| 83 USERSPRIVATE_ISCURRENTUSEROWNER); | 83 USERSPRIVATE_ISCURRENTUSEROWNER); |
| 84 | 84 |
| 85 protected: | 85 protected: |
| 86 ~UsersPrivateIsCurrentUserOwnerFunction() override; | 86 ~UsersPrivateIsCurrentUserOwnerFunction() override; |
| 87 | 87 |
| 88 // ExtensionFunction overrides. | 88 // ExtensionFunction overrides. |
| 89 ResponseAction Run() override; | 89 ResponseAction Run() override; |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 void IsOwnerCallback(bool is_owner); |
| 93 |
| 92 ChromeExtensionFunctionDetails chrome_details_; | 94 ChromeExtensionFunctionDetails chrome_details_; |
| 93 | 95 |
| 94 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsCurrentUserOwnerFunction); | 96 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsCurrentUserOwnerFunction); |
| 95 }; | 97 }; |
| 96 | 98 |
| 97 // Implements the chrome.usersPrivate.isWhitelistManaged method. | 99 // Implements the chrome.usersPrivate.isWhitelistManaged method. |
| 98 class UsersPrivateIsWhitelistManagedFunction | 100 class UsersPrivateIsWhitelistManagedFunction |
| 99 : public UIThreadExtensionFunction { | 101 : public UIThreadExtensionFunction { |
| 100 public: | 102 public: |
| 101 UsersPrivateIsWhitelistManagedFunction(); | 103 UsersPrivateIsWhitelistManagedFunction(); |
| 102 DECLARE_EXTENSION_FUNCTION("usersPrivate.isWhitelistManaged", | 104 DECLARE_EXTENSION_FUNCTION("usersPrivate.isWhitelistManaged", |
| 103 USERSPRIVATE_ISWHITELISTMANAGED); | 105 USERSPRIVATE_ISWHITELISTMANAGED); |
| 104 | 106 |
| 105 protected: | 107 protected: |
| 106 ~UsersPrivateIsWhitelistManagedFunction() override; | 108 ~UsersPrivateIsWhitelistManagedFunction() override; |
| 107 | 109 |
| 108 // ExtensionFunction overrides. | 110 // ExtensionFunction overrides. |
| 109 ResponseAction Run() override; | 111 ResponseAction Run() override; |
| 110 | 112 |
| 111 private: | 113 private: |
| 112 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsWhitelistManagedFunction); | 114 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsWhitelistManagedFunction); |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 } // namespace extensions | 117 } // namespace extensions |
| 116 | 118 |
| 117 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_ | 119 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_ |
| OLD | NEW |