diff options
Diffstat (limited to 'chrome/browser/net/chrome_url_request_context.h')
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h index 2638d46..97997e3 100644 --- a/chrome/browser/net/chrome_url_request_context.h +++ b/chrome/browser/net/chrome_url_request_context.h @@ -51,12 +51,17 @@ class ChromeURLRequestContext : public URLRequestContext { // could be immutable and ref-counted so that we could use them directly from // both threads. There is only a small amount of mutable state in Extension. struct ExtensionInfo { - ExtensionInfo(const std::string& name, const FilePath& path, + ExtensionInfo(const std::string& name, + const FilePath& path, const std::string& default_locale, + bool incognito_split_mode, const ExtensionExtent& extent, const ExtensionExtent& effective_host_permissions, const std::vector<std::string>& api_permissions) - : name(name), path(path), default_locale(default_locale), + : name(name), + path(path), + default_locale(default_locale), + incognito_split_mode(incognito_split_mode), extent(extent), effective_host_permissions(effective_host_permissions), api_permissions(api_permissions) { @@ -64,6 +69,7 @@ class ChromeURLRequestContext : public URLRequestContext { const std::string name; const FilePath path; const std::string default_locale; + const bool incognito_split_mode; const ExtensionExtent extent; const ExtensionExtent effective_host_permissions; std::vector<std::string> api_permissions; @@ -84,6 +90,10 @@ class ChromeURLRequestContext : public URLRequestContext { // extent. bool ExtensionHasWebExtent(const std::string& id); + // Returns true if the specified extension exists and can load in incognito + // contexts. + bool ExtensionCanLoadInIncognito(const std::string& id); + // Returns an empty string if the extension with |id| doesn't have a default // locale. std::string GetDefaultLocaleForExtension(const std::string& id); @@ -312,6 +322,11 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter, // called on the UI thread. static ChromeURLRequestContextGetter* CreateOffTheRecord(Profile* profile); + // Create an instance for an OTR profile for extensions. This is expected + // to get called on UI thread. + static ChromeURLRequestContextGetter* CreateOffTheRecordForExtensions( + Profile* profile); + // Clean up UI thread resources. This is expected to get called on the UI // thread before the instance is deleted on the IO thread. void CleanupOnUIThread(); |