| Index: chrome/browser/autocomplete/autocomplete.cc
|
| ===================================================================
|
| --- chrome/browser/autocomplete/autocomplete.cc (revision 19905)
|
| +++ chrome/browser/autocomplete/autocomplete.cc (working copy)
|
| @@ -125,7 +125,8 @@
|
| // should still claim to handle them.
|
| if (LowerCaseEqualsASCII(parsed_scheme, chrome::kViewSourceScheme) ||
|
| LowerCaseEqualsASCII(parsed_scheme, chrome::kJavaScriptScheme) ||
|
| - LowerCaseEqualsASCII(parsed_scheme, chrome::kDataScheme))
|
| + LowerCaseEqualsASCII(parsed_scheme, chrome::kDataScheme) ||
|
| + LowerCaseEqualsASCII(parsed_scheme, chrome::kPrintScheme))
|
| return URL;
|
|
|
| // Finally, check and see if the user has explicitly opened this scheme as
|
| @@ -257,11 +258,12 @@
|
| *host = parts.host;
|
|
|
| int after_scheme_and_colon = parts.scheme.end() + 1;
|
| - // For the view-source scheme, we should emphasize the scheme and host of
|
| - // the URL qualified by the view-source prefix.
|
| - if (LowerCaseEqualsASCII(scheme_str, chrome::kViewSourceScheme) &&
|
| + // For the view-source and print schemes, we should emphasize the scheme and
|
| + // host of the URL qualified by the scheme prefix.
|
| + if ((LowerCaseEqualsASCII(scheme_str, chrome::kViewSourceScheme) ||
|
| + LowerCaseEqualsASCII(scheme_str, chrome::kPrintScheme)) &&
|
| (static_cast<int>(text.length()) > after_scheme_and_colon)) {
|
| - // Obtain the URL prefixed by view-source and parse it.
|
| + // Obtain the URL prefixed by scheme and parse it.
|
| std::wstring real_url(text.substr(after_scheme_and_colon));
|
| url_parse::Parsed real_parts;
|
| AutocompleteInput::Parse(real_url, desired_tld, &real_parts, NULL);
|
|
|