Index: chrome/browser/extensions/extension_dom_ui.cc |
=================================================================== |
--- chrome/browser/extensions/extension_dom_ui.cc (revision 46398) |
+++ chrome/browser/extensions/extension_dom_ui.cc (working copy) |
@@ -167,10 +167,8 @@ |
if (!url->SchemeIs(chrome::kChromeUIScheme)) |
return false; |
- // Even when the extensions service is enabled by default, it's still |
- // disabled in incognito mode. |
- ExtensionsService* service = profile->GetExtensionsService(); |
- if (!service) |
+ // We can't handle chrome-extension URLs in incognito mode. |
+ if (profile->IsOffTheRecord()) |
return false; |
const DictionaryValue* overrides = |
@@ -180,6 +178,7 @@ |
if (!overrides || !overrides->GetList(UTF8ToWide(page), &url_list)) |
return false; |
+ ExtensionsService* service = profile->GetExtensionsService(); |
if (!service->is_ready()) { |
// TODO(erikkay) So far, it looks like extensions load before the new tab |
// page. I don't know if we have anything that enforces this, so add this |