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

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

Issue 1238683003: Unpunycode search keywords and short names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fix grammar. Created 5 years, 5 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 <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 // the default search engine. The most recently-installed wins. 516 // the default search engine. The most recently-installed wins.
517 base::Time install_time; 517 base::Time install_time;
518 }; 518 };
519 519
520 explicit TemplateURL(const TemplateURLData& data); 520 explicit TemplateURL(const TemplateURLData& data);
521 ~TemplateURL(); 521 ~TemplateURL();
522 522
523 // Generates a suitable keyword for the specified url, which must be valid. 523 // Generates a suitable keyword for the specified url, which must be valid.
524 // This is guaranteed not to return an empty string, since TemplateURLs should 524 // This is guaranteed not to return an empty string, since TemplateURLs should
525 // never have an empty keyword. 525 // never have an empty keyword.
526 static base::string16 GenerateKeyword(const GURL& url); 526 // |accept_languages| is a list of languages, which will be used in
527 // IDN-decoding of |url|'s hostname.
528 static base::string16 GenerateKeyword(const GURL& url,
529 const std::string& accept_languages);
527 530
528 // Generates a favicon URL from the specified url. 531 // Generates a favicon URL from the specified url.
529 static GURL GenerateFaviconURL(const GURL& url); 532 static GURL GenerateFaviconURL(const GURL& url);
530 533
531 // Returns true if |t_url| and |data| are equal in all meaningful respects. 534 // Returns true if |t_url| and |data| are equal in all meaningful respects.
532 // Static to allow either or both params to be NULL. 535 // Static to allow either or both params to be NULL.
533 static bool MatchesData(const TemplateURL* t_url, 536 static bool MatchesData(const TemplateURL* t_url,
534 const TemplateURLData* data, 537 const TemplateURLData* data,
535 const SearchTermsData& search_terms_data); 538 const SearchTermsData& search_terms_data);
536 539
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 TemplateURLRef new_tab_url_ref_; 743 TemplateURLRef new_tab_url_ref_;
741 TemplateURLRef contextual_search_url_ref_; 744 TemplateURLRef contextual_search_url_ref_;
742 scoped_ptr<AssociatedExtensionInfo> extension_info_; 745 scoped_ptr<AssociatedExtensionInfo> extension_info_;
743 746
744 // TODO(sky): Add date last parsed OSD file. 747 // TODO(sky): Add date last parsed OSD file.
745 748
746 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 749 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
747 }; 750 };
748 751
749 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 752 #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