summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:05:34 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:05:34 +0000
commit1bd5413c93779467e15c402e5bb1c866792bcac6 (patch)
tree19615d0f974d67abadd8464d188c5a8a02b84fe0 /chrome/browser/net
parentd9fac60990a817c7ef7f1a7beef90dc319bf299b (diff)
downloadchromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.zip
chromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.tar.gz
chromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.tar.bz2
Disable extensions in incognito mode.
Add a browsertest to make sure we don't crash with an incognito window open. Had to finagle utility_process_host to make it work in a browsertest. BUG=12326 TEST=none Review URL: http://codereview.chromium.org/118476 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 304b506..0a1fb13 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -294,10 +294,12 @@ ChromeURLRequestContext::ChromeURLRequestContext(Profile* profile)
prefs_->AddPrefObserver(prefs::kAcceptLanguages, this);
prefs_->AddPrefObserver(prefs::kCookieBehavior, this);
- registrar_.Add(this, NotificationType::EXTENSIONS_LOADED,
- NotificationService::AllSources());
- registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
- NotificationService::AllSources());
+ if (!is_off_the_record_) {
+ registrar_.Add(this, NotificationType::EXTENSIONS_LOADED,
+ NotificationService::AllSources());
+ registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
+ NotificationService::AllSources());
+ }
}
// NotificationObserver implementation.