| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_SIGNIN_SCREEN_POLICY_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_SIGNIN_SCREEN_POLICY_PROVIDER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/auto_reset.h" |
| 11 #include "base/macros.h" |
| 12 #include "base/strings/string16.h" |
| 13 #include "extensions/browser/management_policy.h" |
| 14 #include "extensions/common/extension.h" |
| 15 |
| 16 namespace chromeos { |
| 17 |
| 18 // A managed policy that guards which extensions can be loaded on |
| 19 // sign-in screen. |
| 20 class SigninScreenPolicyProvider |
| 21 : public extensions::ManagementPolicy::Provider { |
| 22 public: |
| 23 SigninScreenPolicyProvider(); |
| 24 ~SigninScreenPolicyProvider() override; |
| 25 |
| 26 // extensions::ManagementPolicy::Provider: |
| 27 std::string GetDebugPolicyProviderName() const override; |
| 28 bool UserMayLoad(const extensions::Extension* extension, |
| 29 base::string16* error) const override; |
| 30 |
| 31 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(SigninScreenPolicyProvider); |
| 33 }; |
| 34 |
| 35 std::unique_ptr<base::AutoReset<bool>> |
| 36 GetScopedSigninScreenPolicyProviderDisablerForTesting(); |
| 37 |
| 38 } // namespace chromeos |
| 39 |
| 40 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_SIGNIN_SCREEN_POLICY_PROVIDER_H_ |
| OLD | NEW |