Home | History | Annotate | Download | only in src

Lines Matching full:component

59                           const url_parse::Component& host,
60 url_parse::Component components[4]) {
64 int cur_component = 0; // Index of the component we're working on.
65 int cur_component_begin = host.begin; // Start of the current component.
69 // Found the end of the current component.
72 url_parse::Component(cur_component_begin, component_len);
74 // The next component starts after the dot.
79 // allow an empty component at the end (this would indicate that the
80 // input ends in a dot). We also want to error if the component is
81 // empty and it's the only component (cur_component == 1).
89 // Anything else after the 4th component is an error unless it is a
104 components[cur_component++] = url_parse::Component();
108 // Converts an IPv4 component to a 32-bit number, while checking for overflow.
121 const url_parse::Component& component,
126 if (spec[component.begin] == '0') {
128 if (component.len == 1) {
130 } else if (spec[component.begin + 1] == 'X' ||
131 spec[component.begin + 1] == 'x') {
143 while (base_prefix_len < component.len &&
144 spec[component.begin + base_prefix_len] == '0')
147 // Put the component, minus any base prefix, into a NULL-terminated buffer so
154 for (int i = component.begin + base_prefix_len; i < component.end(); i++) {
189 url_parse::Component* out_host) {
207 const url_parse::Component& host,
211 url_parse::Component components[4];
225 // Stop if we hit an invalid non-empty component.
232 // Use that sequence of numbers to fill out the 4-component IP address.
242 // Next, consume the last component to fill in the remaining bytes.
249 // If the last component has residual bits, report overflow.
264 const url_parse::Component& host,
290 // ==> hex_components[0] = Component(3,2) "aa"
291 // ==> hex_components[1] = Component(6,2) "bb"
293 // ==> ipv4_component = Component(0, -1)
297 // ==> hex_components[0] = Component(1,1) "1"
298 // ==> hex_components[1] = Component(3,1) "2"
299 // ==> hex_components[2] = Component(6,1) "3"
300 // ==> hex_components[3] = Component(8,1) "4"
301 // ==> hex_components[4] = Component(10,1) "5"
303 // ==> ipv4_component = Component(0, -1)
307 // ==> hex_components[0] = Component(3,4) "ffff"
309 // ==> ipv4_component = Component(8, 11) "192.168.0.1"
313 // ==> hex_components[0] = Component(1,1) "1"
315 // ==> ipv4_component = Component(0, -1)
320 // ==> ipv4_component = Component(8, 11) "192.168.0.1"
331 url_parse::Component hex_components[8];
336 // The index of the hex component that the "::" contraction precedes, or
341 url_parse::Component ipv4_component;
349 const url_parse::Component& host,
361 int cur_component_begin = begin; // Start of the current component.
369 // We reached the end of the current component if we encounter a colon
375 // A component should not have more than 4 hex digits.
388 // Add the hex component we just found to running list.
395 url_parse::Component(cur_component_begin, component_len);
413 // current component started (after this colon).
421 // a component to be an IPv4 address in dotted form.
426 parsed->ipv4_component = url_parse::Component(
477 const url_parse::Component& component) {
478 DCHECK(component.len <= 4);
482 for (int i = 0; i < component.len; ++i)
483 buf[i] = static_cast<char>(spec[component.begin + i]);
484 buf[component.len] = '\0';
495 const url_parse::Component& host,
497 // Make sure the component is bounded by '[' and ']'.
503 url_parse::Component ipv6_comp(host.begin + 1, host.len - 2);
522 // Append the contraction if it appears before this component.
527 // Append the hex component's value.
529 // Get the 16-bit value for this hex component.
570 url_parse::Component* contraction_range) {
572 url_parse::Component max_range;
575 url_parse::Component cur_range;
584 cur_range = url_parse::Component(i, 0);
604 const url_parse::Component& host,
634 url_parse::Component contraction_range;
674 const url_parse::Component& host,
675 url_parse::Component components[4]) {
680 const url_parse::Component& host,
681 url_parse::Component components[4]) {
686 const url_parse::Component& host,
698 const url_parse::Component& host,
710 const url_parse::Component& host,
717 const url_parse::Component& host,
725 const url_parse::Component& host,
731 const url_parse::Component& host,