Lines Matching refs:component
34 const url_parse::Component& host,
35 url_parse::Component components[4]) {
39 int cur_component = 0; // Index of the component we're working on.
40 int cur_component_begin = host.begin; // Start of the current component.
44 // Found the end of the current component.
47 url_parse::Component(cur_component_begin, component_len);
49 // The next component starts after the dot.
54 // allow an empty component at the end (this would indicate that the
55 // input ends in a dot). We also want to error if the component is
56 // empty and it's the only component (cur_component == 1).
64 // Anything else after the 4th component is an error unless it is a
79 components[cur_component++] = url_parse::Component();
83 // Converts an IPv4 component to a 32-bit number, while checking for overflow.
96 const url_parse::Component& component,
101 if (spec[component.begin] == '0') {
103 if (component.len == 1) {
105 } else if (spec[component.begin + 1] == 'X' ||
106 spec[component.begin + 1] == 'x') {
118 while (base_prefix_len < component.len &&
119 spec[component.begin + base_prefix_len] == '0')
122 // Put the component, minus any base prefix, into a NULL-terminated buffer so
129 for (int i = component.begin + base_prefix_len; i < component.end(); i++) {
162 const url_parse::Component& host,
166 url_parse::Component components[4];
188 // Stop if we hit a non-BROKEN invalid non-empty component.
198 // Use that sequence of numbers to fill out the 4-component IP address.
208 // Next, consume the last component to fill in the remaining bytes.
215 // If the last component has residual bits, report overflow.
230 const url_parse::Component& host,
257 // ==> hex_components[0] = Component(3,2) "aa"
258 // ==> hex_components[1] = Component(6,2) "bb"
260 // ==> ipv4_component = Component(0, -1)
264 // ==> hex_components[0] = Component(1,1) "1"
265 // ==> hex_components[1] = Component(3,1) "2"
266 // ==> hex_components[2] = Component(6,1) "3"
267 // ==> hex_components[3] = Component(8,1) "4"
268 // ==> hex_components[4] = Component(10,1) "5"
270 // ==> ipv4_component = Component(0, -1)
274 // ==> hex_components[0] = Component(3,4) "ffff"
276 // ==> ipv4_component = Component(8, 11) "192.168.0.1"
280 // ==> hex_components[0] = Component(1,1) "1"
282 // ==> ipv4_component = Component(0, -1)
287 // ==> ipv4_component = Component(8, 11) "192.168.0.1"
298 url_parse::Component hex_components[8];
303 // The index of the hex component that the "::" contraction precedes, or
308 url_parse::Component ipv4_component;
316 const url_parse::Component& host,
328 int cur_component_begin = begin; // Start of the current component.
336 // We reached the end of the current component if we encounter a colon
342 // A component should not have more than 4 hex digits.
355 // Add the hex component we just found to running list.
362 url_parse::Component(cur_component_begin, component_len);
380 // current component started (after this colon).
388 // a component to be an IPv4 address in dotted form.
393 parsed->ipv4_component = url_parse::Component(
444 const url_parse::Component& component) {
445 DCHECK(component.len <= 4);
449 for (int i = 0; i < component.len; ++i)
450 buf[i] = static_cast<char>(spec[component.begin + i]);
451 buf[component.len] = '\0';
462 const url_parse::Component& host,
464 // Make sure the component is bounded by '[' and ']'.
470 url_parse::Component ipv6_comp(host.begin + 1, host.len - 2);
489 // Append the contraction if it appears before this component.
494 // Append the hex component's value.
496 // Get the 16-bit value for this hex component.
525 url_parse::Component* contraction_range) {
527 url_parse::Component max_range;
530 url_parse::Component cur_range;
539 cur_range = url_parse::Component(i, 0);
559 const url_parse::Component& host,
611 url_parse::Component contraction_range;
643 const url_parse::Component& host,
644 url_parse::Component components[4]) {
649 const url_parse::Component& host,
650 url_parse::Component components[4]) {
656 const url_parse::Component& host,
668 const url_parse::Component& host,
680 const url_parse::Component& host,
687 const url_parse::Component& host,
695 const url_parse::Component& host,
701 const url_parse::Component& host,