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