• Home
  • Raw
  • Download

Lines Matching full:scheme

27 // A pair for representing a standard scheme name and the SchemeType for it.
29 std::string scheme; member
33 // A pair for representing a scheme and a custom protocol handler for it.
39 std::string scheme; member
64 // WARNING: Adding (1) a non-"standard" scheme or (2) a scheme whose URLs have
89 // loaded with any other URL scheme.
129 // Gets the scheme registry without locking the schemes. This should *only* be
169 return compare_to[0] == 0; // When component is empty, match empty scheme. in DoCompareSchemeComponent()
176 // Returns true and sets |type| to the SchemeType of the given scheme
177 // identified by |scheme| within |spec| if in |schemes|.
180 const Component& scheme, in DoIsInSchemes() argument
183 if (scheme.is_empty()) in DoIsInSchemes()
188 typename CharToStringPiece<CHAR>::Piece(&spec[scheme.begin], in DoIsInSchemes()
189 scheme.len), in DoIsInSchemes()
190 scheme_with_type.scheme)) { in DoIsInSchemes()
199 bool DoIsStandard(const CHAR* spec, const Component& scheme, SchemeType* type) { in DoIsStandard() argument
200 return DoIsInSchemes(spec, scheme, type, in DoIsStandard()
210 // Before extracting scheme, canonicalize the URL to remove any whitespace. in DoFindAndCompareScheme()
219 // No scheme. in DoFindAndCompareScheme()
274 Component scheme; in DoCanonicalize() local
275 if (!ExtractScheme(spec, spec_len, &scheme)) in DoCanonicalize()
282 if (DoCompareSchemeComponent(spec, scheme, url::kFileScheme)) { in DoCanonicalize()
287 } else if (DoCompareSchemeComponent(spec, scheme, url::kFileSystemScheme)) { in DoCanonicalize()
294 } else if (DoIsStandard(spec, scheme, &scheme_type)) { in DoCanonicalize()
300 } else if (DoCompareSchemeComponent(spec, scheme, url::kMailToScheme)) { in DoCanonicalize()
301 // Mailto URLs are treated like standard URLs, with only a scheme, path, in DoCanonicalize()
336 base_parsed.scheme.is_nonempty()) { in DoResolveRelative()
337 int after_scheme = base_parsed.scheme.end() + 1; // Skip past the colon. in DoResolveRelative()
346 base_parsed.scheme.is_nonempty() && in DoResolveRelative()
347 DoIsStandard(base_spec, base_parsed.scheme, &unused_scheme_type); in DoResolveRelative()
383 bool file_base_scheme = base_parsed.scheme.is_nonempty() && in DoResolveRelative()
384 DoCompareSchemeComponent(base_spec, base_parsed.scheme, kFileScheme); in DoResolveRelative()
404 // If the scheme is overridden, just do a simple string substitution and in DoReplaceComponents()
413 // case for replacing the scheme. The most common case for hitting this is in DoReplaceComponents()
418 // Canonicalize the new scheme so it is 8-bit and can be concatenated with in DoReplaceComponents()
422 CanonicalizeScheme(replacements.sources().scheme, in DoReplaceComponents()
423 replacements.components().scheme, in DoReplaceComponents()
427 // a colon after the scheme (or where the scheme would be). in DoReplaceComponents()
428 int spec_after_colon = parsed.scheme.is_valid() ? parsed.scheme.end() + 1 in DoReplaceComponents()
436 // may have changed with the different scheme. in DoReplaceComponents()
443 // Recurse using the version with the scheme already replaced. This will now in DoReplaceComponents()
444 // use the replacement rules for the new scheme. in DoReplaceComponents()
451 // If the scheme-specific replacers are made more intelligent so they don't in DoReplaceComponents()
453 // after this call to check validity (this assumes replacing the scheme is in DoReplaceComponents()
476 // If we get here, then we know the scheme doesn't need to be replaced, so can in DoReplaceComponents()
477 // just key off the scheme in the spec to know how to do the replacements. in DoReplaceComponents()
478 if (DoCompareSchemeComponent(spec, parsed.scheme, url::kFileScheme)) { in DoReplaceComponents()
482 if (DoCompareSchemeComponent(spec, parsed.scheme, url::kFileSystemScheme)) { in DoReplaceComponents()
487 if (DoIsStandard(spec, parsed.scheme, &scheme_type)) { in DoReplaceComponents()
491 if (DoCompareSchemeComponent(spec, parsed.scheme, url::kMailToScheme)) { in DoReplaceComponents()
500 // If this assert triggers, it means you've called Add*Scheme after in DoSchemeModificationPreamble()
503 // This normally means you're trying to set up a new scheme too late or using in DoSchemeModificationPreamble()
506 << "Trying to add a scheme after the lists have been used. " in DoSchemeModificationPreamble()
509 // If this assert triggers, it means you've called Add*Scheme after in DoSchemeModificationPreamble()
513 // This normally means you're trying to set up a new scheme too late in your in DoSchemeModificationPreamble()
515 // and calls LockSchemeRegistries, and add your new scheme there. in DoSchemeModificationPreamble()
517 << "Trying to add a scheme after the lists have been locked."; in DoSchemeModificationPreamble()
528 DCHECK(!base::Contains(*schemes, new_scheme, &SchemeWithHandler::scheme)); in DoAddSchemeWithHandler()
548 DCHECK(!base::Contains(*schemes, new_scheme, &SchemeWithType::scheme)); in DoAddSchemeWithType()
605 result.push_back(entry.scheme); in GetStandardSchemes()
687 result.emplace_back(entry.scheme, entry.handler); in GetPredefinedHandlerSchemes()
696 bool IsStandard(const char* spec, const Component& scheme) { in IsStandard() argument
698 return DoIsStandard(spec, scheme, &unused_scheme_type); in IsStandard()
702 const Component& scheme, in GetStandardSchemeType() argument
704 return DoIsStandard(spec, scheme, type); in GetStandardSchemeType()
708 const Component& scheme, in GetStandardSchemeType() argument
710 return DoIsStandard(spec, scheme, type); in GetStandardSchemeType()
713 bool IsStandard(const char16_t* spec, const Component& scheme) { in IsStandard() argument
715 return DoIsStandard(spec, scheme, &unused_scheme_type); in IsStandard()
718 bool IsReferrerScheme(const char* spec, const Component& scheme) { in IsReferrerScheme() argument
720 return DoIsInSchemes(spec, scheme, &unused_scheme_type, in IsReferrerScheme()