Home | History | Annotate | Download | only in net

Lines Matching refs:domain

184 // Checks |domain| to see if a valid TLD is already present.  If not, appends
185 // |desired_tld| to the domain, and prepends "www." unless it's already present.
187 std::string* domain) {
188 if (desired_tld.empty() || domain->empty())
201 net::RegistryControlledDomainService::GetRegistryLength(*domain, false);
205 // Add the suffix at the end of the domain.
206 const size_t domain_length(domain->length());
209 if ((*domain)[domain_length - 1] != '.')
210 domain->push_back('.');
211 domain->append(desired_tld);
213 // Now, if the domain begins with "www.", stop.
215 if (domain->compare(0, prefix.length(), prefix) != 0) {
217 domain->insert(0, prefix);
252 // Make domain valid.
256 std::string domain(text, part.begin, part.len);
257 const size_t first_nondot(domain.find_first_not_of('.'));
259 domain.erase(0, first_nondot);
260 size_t last_nondot(domain.find_last_not_of('.'));
263 if (last_nondot < domain.length())
264 domain.erase(last_nondot);
268 AddDesiredTLD(desired_tld, &domain);
270 url->append(domain);