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

Unified Diff: chrome/browser/net/url_fixer_upper.cc

Issue 62162: Properly handle empty components when converting url_parse::Parsed object.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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 | « chrome/browser/autocomplete/autocomplete_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/url_fixer_upper.cc
===================================================================
--- chrome/browser/net/url_fixer_upper.cc (revision 13340)
+++ chrome/browser/net/url_fixer_upper.cc (working copy)
@@ -31,6 +31,9 @@
url_parse::Component UTF8ComponentToWideComponent(
string text_utf8,
const url_parse::Component& component_utf8) {
+ if (component_utf8.len == -1)
+ return url_parse::Component();
+
string before_component_string = text_utf8.substr(0, component_utf8.begin);
string component_string = text_utf8.substr(component_utf8.begin,
component_utf8.len);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698