Chromium Code Reviews| Index: chrome/browser/ui/webui/settings/md_settings_ui.cc |
| diff --git a/chrome/browser/ui/webui/settings/md_settings_ui.cc b/chrome/browser/ui/webui/settings/md_settings_ui.cc |
| index b0b68764351090b08af0a51022d231f1f51b6c21..0cf77325aa5372e5f4fcdb74467fc60e5c5e2c17 100644 |
| --- a/chrome/browser/ui/webui/settings/md_settings_ui.cc |
| +++ b/chrome/browser/ui/webui/settings/md_settings_ui.cc |
| @@ -53,7 +53,7 @@ |
| namespace settings { |
| -MdSettingsUI::MdSettingsUI(content::WebUI* web_ui) |
| +MdSettingsUI::MdSettingsUI(content::WebUI* web_ui, const GURL& url) |
| : content::WebUIController(web_ui), |
| WebContentsObserver(web_ui->GetWebContents()) { |
| Profile* profile = Profile::FromWebUI(web_ui); |
| @@ -88,11 +88,6 @@ MdSettingsUI::MdSettingsUI(content::WebUI* web_ui) |
| // Host must be derived from the visible URL, since this might be serving |
| // either chrome://settings or chrome://md-settings. |
| - GURL url = web_ui->GetWebContents()->GetVisibleURL(); |
| - |
| - if (url.SchemeIs(content::kViewSourceScheme)) |
| - url = GURL(url.GetContent()); |
| - |
| CHECK(url.GetOrigin() == GURL(chrome::kChromeUISettingsURL).GetOrigin() || |
|
michaelpg
2016/06/17 20:57:11
it would be nice if we could just crash the tab in
Dan Beam
2016/06/17 21:05:15
CHECK() is stuff that should never happen, so I do
|
| url.GetOrigin() == GURL(chrome::kChromeUIMdSettingsURL).GetOrigin()); |