Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: components/search_engines/template_url.h

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // the default search engine. The most recently-installed wins. 515 // the default search engine. The most recently-installed wins.
516 base::Time install_time; 516 base::Time install_time;
517 }; 517 };
518 518
519 explicit TemplateURL(const TemplateURLData& data); 519 explicit TemplateURL(const TemplateURLData& data);
520 ~TemplateURL(); 520 ~TemplateURL();
521 521
522 // Generates a suitable keyword for the specified url, which must be valid. 522 // Generates a suitable keyword for the specified url, which must be valid.
523 // This is guaranteed not to return an empty string, since TemplateURLs should 523 // This is guaranteed not to return an empty string, since TemplateURLs should
524 // never have an empty keyword. 524 // never have an empty keyword.
525 // |accept_languages| is a list of languages, which will be used in 525 static base::string16 GenerateKeyword(const GURL& url);
526 // IDN-decoding of |url|'s hostname.
527 static base::string16 GenerateKeyword(const GURL& url,
528 const std::string& accept_languages);
529 526
530 // Generates a favicon URL from the specified url. 527 // Generates a favicon URL from the specified url.
531 static GURL GenerateFaviconURL(const GURL& url); 528 static GURL GenerateFaviconURL(const GURL& url);
532 529
533 // Returns true if |t_url| and |data| are equal in all meaningful respects. 530 // Returns true if |t_url| and |data| are equal in all meaningful respects.
534 // Static to allow either or both params to be NULL. 531 // Static to allow either or both params to be NULL.
535 static bool MatchesData(const TemplateURL* t_url, 532 static bool MatchesData(const TemplateURL* t_url,
536 const TemplateURLData* data, 533 const TemplateURLData* data,
537 const SearchTermsData& search_terms_data); 534 const SearchTermsData& search_terms_data);
538 535
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 TemplateURLRef new_tab_url_ref_; 745 TemplateURLRef new_tab_url_ref_;
749 TemplateURLRef contextual_search_url_ref_; 746 TemplateURLRef contextual_search_url_ref_;
750 scoped_ptr<AssociatedExtensionInfo> extension_info_; 747 scoped_ptr<AssociatedExtensionInfo> extension_info_;
751 748
752 // TODO(sky): Add date last parsed OSD file. 749 // TODO(sky): Add date last parsed OSD file.
753 750
754 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 751 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
755 }; 752 };
756 753
757 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 754 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
OLDNEW
« no previous file with comments | « components/search_engines/search_terms_data.cc ('k') | components/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698