Chromium Code Reviews| Index: content/browser/browser_url_handler_impl.cc |
| diff --git a/content/browser/browser_url_handler_impl.cc b/content/browser/browser_url_handler_impl.cc |
| index fb657c0547b9c87e969cb4293e07878d6bbc6afd..5ac3bae2c9517ad474ec435f407420afb49b37a9 100644 |
| --- a/content/browser/browser_url_handler_impl.cc |
| +++ b/content/browser/browser_url_handler_impl.cc |
| @@ -37,6 +37,20 @@ static bool HandleViewSource(GURL* url, BrowserContext* browser_context) { |
| } |
| } |
| + // If none of the default allowed schemes match, try with additional schemes |
| + // from the ContentClient. |
| + if (!is_sub_scheme_allowed) { |
| + std::vector<std::string> additional_schemes; |
| + GetContentClient()->browser()->GetAdditionalSchemesForViewSource( |
|
jam
2014/01/24 22:07:55
actually, now that I think about it some more, it
nyquist
2014/01/25 00:40:38
Done.
One note: this adds chrome::kChromeSearchSc
|
| + &additional_schemes); |
| + for (size_t i = 0; i < additional_schemes.size(); ++i) { |
| + if (url->SchemeIs(additional_schemes[i].c_str())) { |
| + is_sub_scheme_allowed = true; |
| + break; |
| + } |
| + } |
| + } |
| + |
| if (!is_sub_scheme_allowed) { |
| *url = GURL(kAboutBlankURL); |
| return false; |