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

Unified Diff: chrome/browser/profile.cc

Issue 567037: Initial work on making extensions work in incognito mode. (Closed)
Patch Set: added experimental requirement Created 10 years, 10 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/profile.cc
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index a1594b29bf95b70bad218120509b03e38259c1d7..a83ad4a0feb1dd1769c624f74f2674de28e120e4 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_;
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698