| 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_EXTENSION_TAB_UTIL_DELEGATE_CHROMEOS_
H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_TAB_UTIL_DELEGATE_CHROMEOS_
H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chrome/browser/extensions/extension_tab_util.h" |
| 10 |
| 11 namespace api { |
| 12 namespace tabs { |
| 13 class Tab; |
| 14 } |
| 15 } |
| 16 |
| 17 namespace content { |
| 18 class WebContents; |
| 19 } |
| 20 |
| 21 namespace extensions { |
| 22 class Extension; |
| 23 |
| 24 // In Public Sessions, apps and extensions are force-installed by admin policy |
| 25 // so the user does not get a chance to review the permissions for these apps. |
| 26 // This is not acceptable from a security standpoint, so we scrub the URL |
| 27 // returned by chrome.tabs API down to the origin. |
| 28 class ExtensionTabUtilDelegateChromeOS : public ExtensionTabUtil::Delegate { |
| 29 public: |
| 30 ExtensionTabUtilDelegateChromeOS(); |
| 31 ~ExtensionTabUtilDelegateChromeOS() override; |
| 32 |
| 33 // ExtensionTabUtil::Delegate |
| 34 void ScrubTabForExtension(const Extension* extension, |
| 35 content::WebContents* contents, |
| 36 api::tabs::Tab* tab) override; |
| 37 |
| 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(ExtensionTabUtilDelegateChromeOS); |
| 40 }; |
| 41 |
| 42 } // namespace extensions |
| 43 |
| 44 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_TAB_UTIL_DELEGATE_CHROME
OS_H_ |
| OLD | NEW |