summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 23:25:21 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 23:25:21 +0000
commit55a356908083c25a2829db1636564c50c57b430f (patch)
tree1fa448b284205c57f594ca34b175db202af1aec1 /chrome/browser/profile.cc
parent6149d3e3ba96cc4aac419777094a1e090b0825e9 (diff)
downloadchromium_src-55a356908083c25a2829db1636564c50c57b430f.zip
chromium_src-55a356908083c25a2829db1636564c50c57b430f.tar.gz
chromium_src-55a356908083c25a2829db1636564c50c57b430f.tar.bz2
Initial work on making extensions work in incognito mode.
This merely adds a way to enable content scripts and browser actions in incognito windows. They still don't work properly because none of the APIs work with incognito tabs. The way to enable an extension is to add an "incognito" bit in the user prefs file. My plan is to add UI for this later. BUG=32365 Review URL: http://codereview.chromium.org/567037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc21
1 files changed, 7 insertions, 14 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index a1594b2..a83ad4a 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -196,7 +196,6 @@ class OffTheRecordProfileImpl : public Profile,
public:
explicit OffTheRecordProfileImpl(Profile* real_profile)
: profile_(real_profile),
- extensions_request_context_(NULL),
start_time_(Time::Now()) {
request_context_ = ChromeURLRequestContextGetter::CreateOffTheRecord(this);
@@ -209,7 +208,6 @@ class OffTheRecordProfileImpl : public Profile,
virtual ~OffTheRecordProfileImpl() {
CleanupRequestContext(request_context_);
- CleanupRequestContext(extensions_request_context_);
}
virtual ProfileId GetRuntimeId() {
@@ -248,23 +246,25 @@ class OffTheRecordProfileImpl : public Profile,
}
virtual ExtensionsService* GetExtensionsService() {
- return NULL;
+ return GetOriginalProfile()->GetExtensionsService();
}
virtual UserScriptMaster* GetUserScriptMaster() {
- return NULL;
+ return GetOriginalProfile()->GetUserScriptMaster();
}
virtual ExtensionDevToolsManager* GetExtensionDevToolsManager() {
+ // TODO(mpcomplete): figure out whether we should return the original
+ // profile's version.
return NULL;
}
virtual ExtensionProcessManager* GetExtensionProcessManager() {
- return NULL;
+ return GetOriginalProfile()->GetExtensionProcessManager();
}
virtual ExtensionMessageService* GetExtensionMessageService() {
- return NULL;
+ return GetOriginalProfile()->GetExtensionMessageService();
}
virtual SSLHostState* GetSSLHostState() {
@@ -389,12 +389,7 @@ class OffTheRecordProfileImpl : public Profile,
}
URLRequestContextGetter* GetRequestContextForExtensions() {
- if (!extensions_request_context_) {
- extensions_request_context_ =
- ChromeURLRequestContextGetter::CreateOffTheRecordForExtensions(this);
- }
-
- return extensions_request_context_;
+ return GetOriginalProfile()->GetRequestContextForExtensions();
}
virtual net::SSLConfigService* GetSSLConfigService() {
@@ -527,8 +522,6 @@ class OffTheRecordProfileImpl : public Profile,
// The context to use for requests made from this OTR session.
scoped_refptr<ChromeURLRequestContextGetter> request_context_;
- scoped_refptr<ChromeURLRequestContextGetter> extensions_request_context_;
-
// The download manager that only stores downloaded items in memory.
scoped_refptr<DownloadManager> download_manager_;