Lines Matching refs:url
32 // Known parameters found in the URL.
78 TemplateURLRef::TemplateURLRef(const std::string& url,
81 : url_(url),
89 void TemplateURLRef::Set(const std::string& url,
92 url_ = url;
103 std::string* url,
109 if ((*url)[end - 1] == kOptional) {
113 std::string parameter(url->substr(start + 1, length));
114 std::string full_parameter(url->substr(start, end - start + 1));
116 url->erase(start, end - start + 1);
121 url->insert(start, kDefaultCount);
124 url->insert(start, base::IntToString(index_offset_));
128 url->insert(start, base::IntToString(page_offset_));
136 url->insert(start, kOutputEncodingType);
152 url->insert(start, full_parameter);
158 std::string TemplateURLRef::ParseURL(const std::string& url,
162 std::string parsed_url = url;
168 // Since we allow Javascript in the URL, {} pairs could be nested. Match
235 GURL url(url_string);
236 if (!url.is_valid())
239 std::string query_string = url.query();
254 host_ = url.host();
255 path_ = url.path();
340 std::string url = parsed_url_;
348 url.insert(i->index, input_encoding);
353 url.insert(i->index, "aq=f&");
355 url.insert(i->index, StringPrintf("aq=%d&", accepted_suggestion));
359 url.insert(i->index, search_terms_data.GoogleBaseURLValue());
363 url.insert(i->index, search_terms_data.GoogleBaseSuggestURLValue());
368 url.insert(i->index, "oq=" + UTF16ToUTF8(encoded_original_query) +
381 url.insert(i->index, UTF16ToUTF8(rlz_string));
392 url.insert(i->index, std::string(unescaped_terms.begin(),
398 url.insert(i->index, search_terms_data.GetApplicationLocale());
402 url.insert(i->index, UTF16ToUTF8(encoded_terms));
411 return url;
522 return ref1 == ref2 || (ref1 && ref2 && ref1->url() == ref2->url());
536 if (url().find("rlz=") != std::string::npos)
558 GURL TemplateURL::GenerateFaviconURL(const GURL& url) {
559 DCHECK(url.is_valid());
570 return url.ReplaceComponents(rep);
583 return turl && turl->url() &&
584 turl->url()->SupportsReplacementUsingTermsData(search_terms_data);
616 void TemplateURL::SetURL(const std::string& url,
619 url_.Set(url, index_offset, page_offset);
622 void TemplateURL::SetInstantURL(const std::string& url,
625 instant_url_.Set(url, index_offset, page_offset);
650 return show_in_default_list() && url() && url()->SupportsReplacement();
653 void TemplateURL::SetFaviconURL(const GURL& url) {
658 if (!url.is_valid())
661 i->url = url;
666 if (url.is_valid()) {
669 kFaviconSize, url));
678 return i->url;
695 return GURL(url_.url()).host();
699 return GURL(url_.url()).SchemeIs(chrome::kExtensionScheme);