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

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

Issue 1135163002: Omnibox - Strip Extra Whitespace from Custom Search Engine Names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests that don't set short_name Created 5 years, 7 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 static GURL GenerateFaviconURL(const GURL& url); 529 static GURL GenerateFaviconURL(const GURL& url);
530 530
531 // Returns true if |t_url| and |data| are equal in all meaningful respects. 531 // Returns true if |t_url| and |data| are equal in all meaningful respects.
532 // Static to allow either or both params to be NULL. 532 // Static to allow either or both params to be NULL.
533 static bool MatchesData(const TemplateURL* t_url, 533 static bool MatchesData(const TemplateURL* t_url,
534 const TemplateURLData* data, 534 const TemplateURLData* data,
535 const SearchTermsData& search_terms_data); 535 const SearchTermsData& search_terms_data);
536 536
537 const TemplateURLData& data() const { return data_; } 537 const TemplateURLData& data() const { return data_; }
538 538
539 const base::string16& short_name() const { return data_.short_name; } 539 const base::string16& short_name() const { return data_.short_name(); }
540 // An accessor for the short_name, but adjusted so it can be appropriately 540 // An accessor for the short_name, but adjusted so it can be appropriately
541 // displayed even if it is LTR and the UI is RTL. 541 // displayed even if it is LTR and the UI is RTL.
542 base::string16 AdjustedShortNameForLocaleDirection() const; 542 base::string16 AdjustedShortNameForLocaleDirection() const;
543 543
544 const base::string16& keyword() const { return data_.keyword(); } 544 const base::string16& keyword() const { return data_.keyword(); }
545 545
546 const std::string& url() const { return data_.url(); } 546 const std::string& url() const { return data_.url(); }
547 const std::string& suggestions_url() const { return data_.suggestions_url; } 547 const std::string& suggestions_url() const { return data_.suggestions_url; }
548 const std::string& instant_url() const { return data_.instant_url; } 548 const std::string& instant_url() const { return data_.instant_url; }
549 const std::string& image_url() const { return data_.image_url; } 549 const std::string& image_url() const { return data_.image_url; }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 TemplateURLRef new_tab_url_ref_; 739 TemplateURLRef new_tab_url_ref_;
740 TemplateURLRef contextual_search_url_ref_; 740 TemplateURLRef contextual_search_url_ref_;
741 scoped_ptr<AssociatedExtensionInfo> extension_info_; 741 scoped_ptr<AssociatedExtensionInfo> extension_info_;
742 742
743 // TODO(sky): Add date last parsed OSD file. 743 // TODO(sky): Add date last parsed OSD file.
744 744
745 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 745 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
746 }; 746 };
747 747
748 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 748 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
OLDNEW
« no previous file with comments | « components/search_engines/keyword_table_unittest.cc ('k') | components/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698