Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_PERMISSIONS_UPDATER_DELEGATE_CHROMEOS _H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_PERMISSIONS_UPDATER_DELEGATE_CHROMEOS _H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "chrome/browser/extensions/permissions_updater.h" | |
| 12 | |
| 13 namespace extensions { | |
| 14 | |
| 15 class Extension; | |
| 16 class PermissionSet; | |
| 17 | |
| 18 // In Public Sessions, apps and extensions are force-installed by admin policy | |
| 19 // so the user does not get a chance to review the permissions for these apps. | |
| 20 // This is not acceptable from a security standpoint, so we remove ClipboardRead | |
|
Devlin
2017/04/08 00:30:51
This comment starts to get very specific, and is p
Ivan Šandrk
2017/04/10 12:04:35
Done.
| |
| 21 // permission from them (except for whitelisted ones - eg. remote desktop | |
| 22 // clients). This forceful removal of permission is safe since the clipboard | |
| 23 // pasting code checks for this permission before doing the paste (the end | |
| 24 // result is just an empty paste). | |
| 25 class PermissionsUpdaterDelegateChromeOS : public PermissionsUpdater::Delegate { | |
| 26 public: | |
| 27 PermissionsUpdaterDelegateChromeOS(); | |
| 28 ~PermissionsUpdaterDelegateChromeOS() override; | |
| 29 | |
| 30 // PermissionsUpdater::Delegate | |
| 31 void InitializePermissions( | |
| 32 const Extension* extension, | |
| 33 std::unique_ptr<const PermissionSet>* granted_permissions) override; | |
| 34 | |
| 35 private: | |
| 36 DISALLOW_COPY_AND_ASSIGN(PermissionsUpdaterDelegateChromeOS); | |
| 37 }; | |
| 38 | |
| 39 } // namespace extensions | |
| 40 | |
| 41 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_PERMISSIONS_UPDATER_DELEGATE_CHROM EOS_H_ | |
| OLD | NEW |