summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
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/net
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/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc36
-rw-r--r--chrome/browser/net/chrome_url_request_context.h4
2 files changed, 0 insertions, 40 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index e206121..3faa8d3 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -283,32 +283,6 @@ ChromeURLRequestContext* FactoryForOffTheRecord::Create() {
return context;
}
-// Factory that creates the ChromeURLRequestContext for extensions in incognito
-// mode.
-class FactoryForOffTheRecordExtensions
- : public ChromeURLRequestContextFactory {
- public:
- explicit FactoryForOffTheRecordExtensions(Profile* profile)
- : ChromeURLRequestContextFactory(profile) {}
-
- virtual ChromeURLRequestContext* Create();
-};
-
-ChromeURLRequestContext* FactoryForOffTheRecordExtensions::Create() {
- ChromeURLRequestContext* context = new ChromeURLRequestContext;
- ApplyProfileParametersToContext(context);
-
- net::CookieMonster* cookie_monster = new net::CookieMonster(NULL);
-
- // Enable cookies for extension URLs only.
- const char* schemes[] = {chrome::kExtensionScheme};
- cookie_monster->SetCookieableSchemes(schemes, 1);
- context->set_cookie_store(cookie_monster);
- // No dynamic cookie policy for extensions.
-
- return context;
-}
-
// Factory that creates the ChromeURLRequestContext for media.
class FactoryForMedia : public ChromeURLRequestContextFactory {
public:
@@ -501,16 +475,6 @@ ChromeURLRequestContextGetter::CreateOffTheRecord(Profile* profile) {
profile, new FactoryForOffTheRecord(profile));
}
-// static
-ChromeURLRequestContextGetter*
-ChromeURLRequestContextGetter::CreateOffTheRecordForExtensions(
- Profile* profile) {
- DCHECK(profile->IsOffTheRecord());
- return new ChromeURLRequestContextGetter(
- profile,
- new FactoryForOffTheRecordExtensions(profile));
-}
-
void ChromeURLRequestContextGetter::CleanupOnUIThread() {
CheckCurrentlyOnMainThread();
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index 99aed21..df9b64a 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -280,10 +280,6 @@ class ChromeURLRequestContextGetter : public URLRequestContextGetter,
// called on the UI thread.
static ChromeURLRequestContextGetter* CreateOffTheRecord(Profile* profile);
- // Create an instance of request context for OTR profile for extensions.
- 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();