Chromium Code Reviews| Index: chrome/browser/extensions/permissions_updater_delegate_chromeos.h |
| diff --git a/chrome/browser/extensions/permissions_updater_delegate_chromeos.h b/chrome/browser/extensions/permissions_updater_delegate_chromeos.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..11873b778e23a312a94489813f347b01166b4648 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/permissions_updater_delegate_chromeos.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_DELEGATE_CHROMEOS_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_DELEGATE_CHROMEOS_H_ |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/extensions/permissions_updater.h" |
| +#include "content/public/browser/browser_context.h" |
|
Devlin
2017/04/05 14:35:20
unneeded
Ivan Šandrk
2017/04/07 14:39:40
Done.
|
| +#include "extensions/common/extension.h" |
|
Devlin
2017/04/05 14:35:20
prefer forward declaration
Ivan Šandrk
2017/04/07 14:39:40
Done.
|
| + |
| +namespace extensions { |
| + |
| +// In Public Sessions, apps and extensions are force-installed by admin policy |
| +// so the user does not get a chance to review the permissions for these apps. |
| +// This is not acceptable from a security standpoint, so we remove ClipboardRead |
| +// permission from them (except for whitelisted ones - eg. remote desktop |
| +// clients). This forceful removal of permission is safe since the clipboard |
| +// pasting code checks for this permission before doing the paste (the end |
| +// result is just an empty paste). |
| +class PermissionsUpdaterDelegateChromeOS : public PermissionsUpdater::Delegate { |
|
Devlin
2017/04/05 14:35:20
as hinted in permissions updater, it'd be great fo
Ivan Šandrk
2017/04/07 14:39:40
Done.
|
| + public: |
| + PermissionsUpdaterDelegateChromeOS(); |
| + ~PermissionsUpdaterDelegateChromeOS() override; |
| + |
| + // PermissionsUpdater::Delegate |
| + void InitializePermissions(PermissionsUpdater* permissions_updater, |
| + const Extension* extension) override; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(PermissionsUpdaterDelegateChromeOS); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_PERMISSIONS_UPDATER_DELEGATE_CHROMEOS_H_ |