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

Unified Diff: chrome/browser/extensions/extension_tab_util.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/extensions/extension_tab_util.h
diff --git a/chrome/browser/extensions/extension_tab_util.h b/chrome/browser/extensions/extension_tab_util.h
index 40107b3967274222cc7e56b9b291b93fbf123471..d37403d40052804f477e0255fbc4be9d85d13b55 100644
--- a/chrome/browser/extensions/extension_tab_util.h
+++ b/chrome/browser/extensions/extension_tab_util.h
@@ -53,6 +53,16 @@ class ExtensionTabUtil {
std::unique_ptr<int> index;
};
+ // Platform specific delegate.
+ class Delegate {
+ public:
+ virtual ~Delegate() {}
+ // Platform specific scrubbing of tab info for |extension|.
+ virtual void ScrubTabForExtension(const Extension* extension,
+ content::WebContents* contents,
+ api::tabs::Tab* tab) = 0;
+ };
+
// Opens a new tab given an extension function |function| and creation
// parameters |params|. Returns a Tab object if successful, or NULL and
// optionally sets |error| if an error occurs.
@@ -114,6 +124,11 @@ class ExtensionTabUtil {
static std::unique_ptr<api::tabs::MutedInfo> CreateMutedInfo(
content::WebContents* contents);
+ // Platform specific logic moved to delegate. This should be set during
+ // startup.
+ // |delegate| is a singleton instance and is leaked.
+ static void SetPlatformDelegate(Delegate* delegate);
+
// Removes any privacy-sensitive fields from a Tab object if appropriate,
// given the permissions of the extension and the tab in question. The
// tab object is modified in place.

Powered by Google App Engine
This is Rietveld 408576698