commit | 1d81619dbd351cb570943140bddac7a80559dd76 | [log] [tgz] |
---|---|---|
author | Clark DuVall <[email protected]> | Fri Jul 19 19:54:42 2019 |
committer | Commit Bot <[email protected]> | Fri Jul 19 19:54:42 2019 |
tree | c48517a814e68faa44b2f690f571e1ce8edd0784 | |
parent | 8ab345762944584f45452b86416f0e903a4c3a64 [diff] [blame] |
Move WebRequest to the UI thread Now that network service is launched, there is no reason to have WebRequest run on the IO thread. This moves all WebRequest code and the WebRequestProxyingURLLoaderFactory to the UI thread, which eliminates thread hops. For more info, see the Chrome IO Thread Simplification: Planning doc: https://docs.google.com/document/d/1fowGQ8xWBv4YqHj_YbK-S3wpmJQDE7L0-GwNR_vAkHE/edit# Change-Id: I5ba8954c5d91c98c96a66558ecb659b59ff4386c Bug: 980774 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1682434 Reviewed-by: Karan Bhatia <[email protected]> Reviewed-by: Lei Zhang <[email protected]> Reviewed-by: Steven Holte <[email protected]> Commit-Queue: Clark DuVall <[email protected]> Cr-Commit-Position: refs/heads/master@{#679227}
diff --git a/extensions/browser/extension_util.cc b/extensions/browser/extension_util.cc index 3cd9723c..854ea5ae 100644 --- a/extensions/browser/extension_util.cc +++ b/extensions/browser/extension_util.cc
@@ -50,6 +50,16 @@ return ExtensionPrefs::Get(context)->IsIncognitoEnabled(extension_id); } +bool CanCrossIncognito(const Extension* extension, + content::BrowserContext* context) { + // We allow the extension to see events and data from another profile iff it + // uses "spanning" behavior and it has incognito access. "split" mode + // extensions only see events for a matching profile. + CHECK(extension); + return IsIncognitoEnabled(extension->id(), context) && + !IncognitoInfo::IsSplitMode(extension); +} + GURL GetSiteForExtensionId(const std::string& extension_id, content::BrowserContext* context) { return content::SiteInstance::GetSiteForURL(