• 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
157 return compare_to[0] == 0; // When component is empty, match empty scheme. in DoCompareSchemeComponent()
163 // Returns true and sets |type| to the SchemeType of the given scheme
164 // identified by |scheme| within |spec| if in |schemes|.
167 const Component& scheme, in DoIsInSchemes() argument
170 if (scheme.is_empty()) in DoIsInSchemes()
175 std::basic_string_view(&spec[scheme.begin], scheme.len), in DoIsInSchemes()
176 scheme_with_type.scheme)) { in DoIsInSchemes()
185 bool DoIsStandard(const CHAR* spec, const Component& scheme, SchemeType* type) { in DoIsStandard() argument
186 return DoIsInSchemes(spec, scheme, type, in DoIsStandard()
196 // Before extracting scheme, canonicalize the URL to remove any whitespace. in DoFindAndCompareScheme()
205 // No scheme. in DoFindAndCompareScheme()
260 Component scheme; in DoCanonicalize() local
261 if (!ExtractScheme(spec, spec_len, &scheme)) in DoCanonicalize()
268 if (DoCompareSchemeComponent(spec, scheme, url::kFileScheme)) { in DoCanonicalize()
273 } else if (DoCompareSchemeComponent(spec, scheme, url::kFileSystemScheme)) { in DoCanonicalize()
280 } else if (DoIsStandard(spec, scheme, &scheme_type)) { in DoCanonicalize()
286 } else if (DoCompareSchemeComponent(spec, scheme, url::kMailToScheme)) { in DoCanonicalize()
287 // Mailto URLs are treated like standard URLs, with only a scheme, path, in DoCanonicalize()
322 base_parsed.scheme.is_nonempty()) { in DoResolveRelative()
323 int after_scheme = base_parsed.scheme.end() + 1; // Skip past the colon. in DoResolveRelative()
332 base_parsed.scheme.is_nonempty() && in DoResolveRelative()
333 DoIsStandard(base_spec, base_parsed.scheme, &unused_scheme_type); in DoResolveRelative()
369 bool file_base_scheme = base_parsed.scheme.is_nonempty() && in DoResolveRelative()
370 DoCompareSchemeComponent(base_spec, base_parsed.scheme, kFileScheme); in DoResolveRelative()
390 // If the scheme is overridden, just do a simple string substitution and in DoReplaceComponents()
399 // case for replacing the scheme. The most common case for hitting this is in DoReplaceComponents()
404 // Canonicalize the new scheme so it is 8-bit and can be concatenated with in DoReplaceComponents()
408 CanonicalizeScheme(replacements.sources().scheme, in DoReplaceComponents()
409 replacements.components().scheme, in DoReplaceComponents()
413 // a colon after the scheme (or where the scheme would be). in DoReplaceComponents()
414 int spec_after_colon = parsed.scheme.is_valid() ? parsed.scheme.end() + 1 in DoReplaceComponents()
422 // may have changed with the different scheme. in DoReplaceComponents()
429 // Recurse using the version with the scheme already replaced. This will now in DoReplaceComponents()
430 // use the replacement rules for the new scheme. in DoReplaceComponents()
437 // If the scheme-specific replacers are made more intelligent so they don't in DoReplaceComponents()
439 // after this call to check validity (this assumes replacing the scheme is in DoReplaceComponents()
462 // If we get here, then we know the scheme doesn't need to be replaced, so can in DoReplaceComponents()
463 // just key off the scheme in the spec to know how to do the replacements. in DoReplaceComponents()
464 if (DoCompareSchemeComponent(spec, parsed.scheme, url::kFileScheme)) { in DoReplaceComponents()
468 if (DoCompareSchemeComponent(spec, parsed.scheme, url::kFileSystemScheme)) { in DoReplaceComponents()
473 if (DoIsStandard(spec, parsed.scheme, &scheme_type)) { in DoReplaceComponents()
477 if (DoCompareSchemeComponent(spec, parsed.scheme, url::kMailToScheme)) { in DoReplaceComponents()
486 // If this assert triggers, it means you've called Add*Scheme after in DoSchemeModificationPreamble()
489 // This normally means you're trying to set up a new scheme too late or using in DoSchemeModificationPreamble()
492 << "Trying to add a scheme after the lists have been used. " in DoSchemeModificationPreamble()
495 // If this assert triggers, it means you've called Add*Scheme after in DoSchemeModificationPreamble()
499 // This normally means you're trying to set up a new scheme too late in your in DoSchemeModificationPreamble()
501 // and calls LockSchemeRegistries, and add your new scheme there. in DoSchemeModificationPreamble()
503 << "Trying to add a scheme after the lists have been locked."; in DoSchemeModificationPreamble()
514 DCHECK(!base::Contains(*schemes, new_scheme, &SchemeWithHandler::scheme)); in DoAddSchemeWithHandler()
534 DCHECK(!base::Contains(*schemes, new_scheme, &SchemeWithType::scheme)); in DoAddSchemeWithType()
591 result.push_back(entry.scheme); in GetStandardSchemes()
673 result.emplace_back(entry.scheme, entry.handler); in GetPredefinedHandlerSchemes()
682 bool IsStandard(const char* spec, const Component& scheme) { in IsStandard() argument
684 return DoIsStandard(spec, scheme, &unused_scheme_type); in IsStandard()
688 const Component& scheme, in GetStandardSchemeType() argument
690 return DoIsStandard(spec, scheme, type); in GetStandardSchemeType()
694 const Component& scheme, in GetStandardSchemeType() argument
696 return DoIsStandard(spec, scheme, type); in GetStandardSchemeType()
699 bool IsStandard(const char16_t* spec, const Component& scheme) { in IsStandard() argument
701 return DoIsStandard(spec, scheme, &unused_scheme_type); in IsStandard()
704 bool IsReferrerScheme(const char* spec, const Component& scheme) { in IsReferrerScheme() argument
706 return DoIsInSchemes(spec, scheme, &unused_scheme_type, in IsReferrerScheme()