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

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

Issue 2166693002: [MD Settings] PROOF OF CONCEPT - DO NOT LAND - URL rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use existing hooks Created 4 years, 5 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/ui/webui/md_history_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_web_ui.cc
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index 06dae536319e928b0756de4657c4c339b9638456..1fa37bce329f281f2a2811472280f3b9f700921a 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -377,6 +377,9 @@ bool ExtensionWebUI::HandleChromeURLOverride(
if (!url->SchemeIs(content::kChromeUIScheme))
return false;
+ if (!browser_context)
+ return false;
+
Profile* profile = Profile::FromBrowserContext(browser_context);
const base::DictionaryValue* overrides =
profile->GetPrefs()->GetDictionary(kExtensionURLOverrides);
@@ -440,6 +443,9 @@ bool ExtensionWebUI::HandleChromeURLOverride(
// static
bool ExtensionWebUI::HandleChromeURLOverrideReverse(
GURL* url, content::BrowserContext* browser_context) {
+ if (!browser_context)
+ return false;
+
Profile* profile = Profile::FromBrowserContext(browser_context);
const base::DictionaryValue* overrides =
profile->GetPrefs()->GetDictionary(kExtensionURLOverrides);
« no previous file with comments | « no previous file | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698