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

Unified Diff: src/url_canon_stdurl.cc

Issue 564011: Remove the rule that "://" means a standard URL. This fixes a number of bugs... (Closed) Base URL: http://google-url.googlecode.com/svn/trunk/
Patch Set: '' Created 10 years, 10 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 | « src/gurl_unittest.cc ('k') | src/url_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/url_canon_stdurl.cc
===================================================================
--- src/url_canon_stdurl.cc (revision 122)
+++ src/url_canon_stdurl.cc (working copy)
@@ -170,6 +170,15 @@
output, new_parsed);
}
+// It might be nice in the future to optimize this so unchanged components don't
+// need to be recanonicalized. This is especially true since the common case for
+// ReplaceComponents is removing things we don't want, like reference fragments
+// and usernames. These cases can become more efficient if we can assume the
+// rest of the URL is OK with these removed (or only the modified parts
+// recanonicalized). This would be much more complex to implement, however.
+//
+// You would also need to update DoReplaceComponents in url_util.cc which
+// relies on this re-checking everything (see the comment there for why).
bool ReplaceStandardURL(const char* base,
const url_parse::Parsed& base_parsed,
const Replacements<char>& replacements,
« no previous file with comments | « src/gurl_unittest.cc ('k') | src/url_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698