Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeos.h

Issue 2830903003: PS - Scrub URL down to origin in Public Sessions (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698