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

Unified Diff: chrome/browser/net/chrome_url_request_context.h

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 years, 4 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
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_url_request_context.h
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index 2638d4650eefe6a9080c0ce63817ec0bae967ef2..97997e3c83898b20f8ec843da6e0492a998180ab 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();
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698