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

Side by Side Diff: chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.h

Issue 2858643002: PS - Filtering activeTab URL (Closed)
Patch Set: ExtensionBuilder in test Created 3 years, 7 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/device_local_account_management_policy_provider.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC Y_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC Y_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC Y_PROVIDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_POLIC Y_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/chromeos/policy/device_local_account.h" 12 #include "chrome/browser/chromeos/policy/device_local_account.h"
13 #include "extensions/browser/management_policy.h" 13 #include "extensions/browser/management_policy.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 // A managed policy for device-local accounts that ensures only extensions whose 17 // A managed policy for device-local accounts that ensures only extensions whose
18 // type or ID has been whitelisted for use in device-local accounts can be 18 // type or ID has been whitelisted for use in device-local accounts can be
19 // installed. 19 // installed.
20 class DeviceLocalAccountManagementPolicyProvider 20 class DeviceLocalAccountManagementPolicyProvider
21 : public extensions::ManagementPolicy::Provider { 21 : public extensions::ManagementPolicy::Provider {
22 public: 22 public:
23 explicit DeviceLocalAccountManagementPolicyProvider( 23 explicit DeviceLocalAccountManagementPolicyProvider(
24 policy::DeviceLocalAccount::Type account_type); 24 policy::DeviceLocalAccount::Type account_type);
25 ~DeviceLocalAccountManagementPolicyProvider() override; 25 ~DeviceLocalAccountManagementPolicyProvider() override;
26 26
27 // Used to check whether an extension is explicitly whitelisted. 27 // Used to check whether an extension is explicitly whitelisted.
28 static bool IsWhitelisted(const extensions::Extension* extension); 28 static bool IsWhitelisted(const std::string& extension_id);
29 29
30 // extensions::ManagementPolicy::Provider: 30 // extensions::ManagementPolicy::Provider:
31 std::string GetDebugPolicyProviderName() const override; 31 std::string GetDebugPolicyProviderName() const override;
32 bool UserMayLoad(const extensions::Extension* extension, 32 bool UserMayLoad(const extensions::Extension* extension,
33 base::string16* error) const override; 33 base::string16* error) const override;
34 34
35 private: 35 private:
36 const policy::DeviceLocalAccount::Type account_type_; 36 const policy::DeviceLocalAccount::Type account_type_;
37 37
38 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountManagementPolicyProvider); 38 DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountManagementPolicyProvider);
39 }; 39 };
40 40
41 } // namespace chromeos 41 } // namespace chromeos
42 42
43 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_PO LICY_PROVIDER_H_ 43 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEVICE_LOCAL_ACCOUNT_MANAGEMENT_PO LICY_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/device_local_account_management_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698