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

Unified Diff: chrome/browser/extensions/extension_dom_ui.cc

Issue 1930003: Merge 46390 - Prevent chrome extension URL overrides from applying in incogni... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
Patch Set: Created 10 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_override_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_override_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698