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

Unified Diff: chrome/browser/autocomplete/autocomplete.cc

Issue 150207: Foundations for Print Preview and Setup... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/child_process_security_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/child_process_security_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698