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

Side by Side Diff: chrome/browser/chromeos/extensions/users_private/users_private_api.h

Issue 2902253004: Settings: Users: Make isCurrentUserOwner async (Closed)
Patch Set: Fix test Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/users_private/users_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/users_private/users_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698