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

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

Issue 8427019: Make the omnibox treat all paths that end in \ or / as URLs, not just paths that consist solely o... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 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/autocomplete/autocomplete_unittest.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 107404)
+++ chrome/browser/autocomplete/autocomplete.cc (working copy)
@@ -359,8 +359,11 @@
return URL;
// Trailing slashes force the input to be treated as a URL.
- if (parts->path.len == 1)
- return URL;
+ if (parts->path.is_nonempty()) {
+ char c = text[parts->path.end() - 1];
+ if ((c == '\\') || (c == '/'))
+ return URL;
+ }
// If there is more than one recognized non-host component, this is likely to
// be a URL, even if the TLD is unknown (in which case this is likely an
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698