Lines Matching refs:scheme
17 // Parses the proxy type from a PAC string, to a ProxyServer::Scheme.
20 ProxyServer::Scheme GetSchemeFromPacTypeInternal(
45 // Parses the proxy scheme from a URL-like representation, to a
46 // ProxyServer::Scheme. This corresponds with the values used in
48 ProxyServer::Scheme GetSchemeFromURIInternal(std::string::const_iterator begin,
77 ProxyServer::ProxyServer(Scheme scheme, const HostPortPair& host_port_pair)
78 : scheme_(scheme), host_port_pair_(host_port_pair) {
89 // Doesn't make sense to call this if the URI scheme doesn't
97 Scheme default_scheme) {
104 Scheme default_scheme) {
105 // We will default to |default_scheme| if no scheme specifier was given.
106 Scheme scheme = default_scheme;
111 // Check for [<scheme> "://"]
117 scheme = GetSchemeFromURIInternal(begin, colon);
122 return FromSchemeHostAndPort(scheme, begin, end);
130 // Leave off "http://" since it is our default scheme.
141 // Got called with an invalid scheme.
169 // Everything to the left of the space is the scheme.
170 Scheme scheme = GetSchemeFromPacTypeInternal(begin, space);
174 return FromSchemeHostAndPort(scheme, space, end);
193 // Got called with an invalid scheme.
200 int ProxyServer::GetDefaultPortForScheme(Scheme scheme) {
201 switch (scheme) {
218 ProxyServer::Scheme ProxyServer::GetSchemeFromURI(const std::string& scheme) {
219 return GetSchemeFromURIInternal(scheme.begin(), scheme.end());
245 Scheme scheme,
252 if (scheme == SCHEME_DIRECT && begin != end)
257 if (scheme != SCHEME_INVALID && scheme != SCHEME_DIRECT) {
260 // If the scheme has a host/port, parse it.
267 port = GetDefaultPortForScheme(scheme);
272 return ProxyServer(scheme, host_port_pair);