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

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

Issue 2816383002: Remove non-const version of GetDefaultSearchProvider() and make all callers call the const version (Closed)
Patch Set: Fix instant extended interactive ui test for calling the const version of GetDefaultSearchProvider() Created 3 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 <memory> 10 #include <memory>
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 653
654 // Given a |url| corresponding to this TemplateURL, identifies the search 654 // Given a |url| corresponding to this TemplateURL, identifies the search
655 // terms and replaces them with the ones in |search_terms_args|, leaving the 655 // terms and replaces them with the ones in |search_terms_args|, leaving the
656 // other parameters untouched. If the replacement fails, returns false and 656 // other parameters untouched. If the replacement fails, returns false and
657 // leaves |result| untouched. This is used by mobile ports to perform query 657 // leaves |result| untouched. This is used by mobile ports to perform query
658 // refinement. 658 // refinement.
659 bool ReplaceSearchTermsInURL( 659 bool ReplaceSearchTermsInURL(
660 const GURL& url, 660 const GURL& url,
661 const TemplateURLRef::SearchTermsArgs& search_terms_args, 661 const TemplateURLRef::SearchTermsArgs& search_terms_args,
662 const SearchTermsData& search_terms_data, 662 const SearchTermsData& search_terms_data,
663 GURL* result); 663 GURL* result) const;
664 664
665 // Encodes the search terms from |search_terms_args| so that we know the 665 // Encodes the search terms from |search_terms_args| so that we know the
666 // |input_encoding|. Returns the |encoded_terms| and the 666 // |input_encoding|. Returns the |encoded_terms| and the
667 // |encoded_original_query|. |encoded_terms| may be escaped as path or query 667 // |encoded_original_query|. |encoded_terms| may be escaped as path or query
668 // depending on |is_in_query|; |encoded_original_query| is always escaped as 668 // depending on |is_in_query|; |encoded_original_query| is always escaped as
669 // query. 669 // query.
670 void EncodeSearchTerms( 670 void EncodeSearchTerms(
671 const TemplateURLRef::SearchTermsArgs& search_terms_args, 671 const TemplateURLRef::SearchTermsArgs& search_terms_args,
672 bool is_in_query, 672 bool is_in_query,
673 std::string* input_encoding, 673 std::string* input_encoding,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 733
734 // Caches the computed engine type across successive calls to GetEngineType(). 734 // Caches the computed engine type across successive calls to GetEngineType().
735 mutable SearchEngineType engine_type_; 735 mutable SearchEngineType engine_type_;
736 736
737 // TODO(sky): Add date last parsed OSD file. 737 // TODO(sky): Add date last parsed OSD file.
738 738
739 DISALLOW_COPY_AND_ASSIGN(TemplateURL); 739 DISALLOW_COPY_AND_ASSIGN(TemplateURL);
740 }; 740 };
741 741
742 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_ 742 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698