Home | History | Annotate | Download | only in net

Lines Matching refs:scheme

58   parts->scheme =
59 UTF8ComponentToUTF16Component(text_utf8, parts_utf8.scheme);
339 // Try to extract a valid scheme from the beginning of |text|.
340 // If successful, set |scheme_component| to the text range where the scheme
351 // Make sure the scheme contains only valid characters, and convert
371 // will add an HTTP scheme later and make the URL parser happy.
401 std::string scheme;
402 if (!GetValidScheme(text, &parts->scheme, &scheme)) {
403 // Couldn't determine the scheme, so just pick one.
404 parts->scheme.reset();
405 scheme.assign(StartsWithASCII(text, "ftp.", false) ?
410 if ((scheme == chrome::kFileScheme) ||
411 !url_util::IsStandard(scheme.c_str(),
412 url_parse::Component(0, static_cast<int>(scheme.length()))))
413 return scheme;
415 if (parts->scheme.is_valid()) {
419 return scheme;
422 // We need to add a scheme in order for ParseStandardURL to be happy.
428 // Construct the text to parse by inserting the scheme.
429 std::string inserted_text(scheme);
442 OffsetComponent(offset, &parts->scheme);
451 return scheme;
463 std::string scheme(SegmentURL(trimmed, &parts));
467 if (scheme == chrome::kViewSourceScheme) {
472 FixupURL(trimmed.substr(scheme.length() + 1),
477 // We handle the file scheme separately.
478 if (scheme == chrome::kFileScheme)
479 return GURL(parts.scheme.is_valid() ? text : FixupPath(text));
482 if (url_util::IsStandard(scheme.c_str(),
483 url_parse::Component(0, static_cast<int>(scheme.length())))) {
484 std::string url(scheme);
496 FixupHost(trimmed, parts.host, parts.scheme.is_valid(), desired_tld, &url);
505 // In the worst-case, we insert a scheme if the URL lacks one.
506 if (!parts.scheme.is_valid()) {
507 std::string fixed_scheme(scheme);