| Index: chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeos.h
|
| diff --git a/chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeos.h b/chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeos.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3718a62ff9b417dd2b50781468d3a453ddf90ec9
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeos.h
|
| @@ -0,0 +1,44 @@
|
| +// 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_CHROMEOS_EXTENSIONS_EXTENSION_TAB_UTIL_DELEGATE_CHROMEOS_H_
|
| +#define CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_TAB_UTIL_DELEGATE_CHROMEOS_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "chrome/browser/extensions/extension_tab_util.h"
|
| +
|
| +namespace api {
|
| +namespace tabs {
|
| +class Tab;
|
| +}
|
| +}
|
| +
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +
|
| +namespace extensions {
|
| +class Extension;
|
| +
|
| +// 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 scrub the URL
|
| +// returned by chrome.tabs API down to the origin.
|
| +class ExtensionTabUtilDelegateChromeOS : public ExtensionTabUtil::Delegate {
|
| + public:
|
| + ExtensionTabUtilDelegateChromeOS();
|
| + ~ExtensionTabUtilDelegateChromeOS() override;
|
| +
|
| + // ExtensionTabUtil::Delegate
|
| + void ScrubTabForExtension(const Extension* extension,
|
| + content::WebContents* contents,
|
| + api::tabs::Tab* tab) override;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(ExtensionTabUtilDelegateChromeOS);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_EXTENSION_TAB_UTIL_DELEGATE_CHROMEOS_H_
|
|
|