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

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

Issue 2487633003: Change behaivor to decide whether a search engine should be shown in the default list (Closed)
Patch Set: Update based on Peter and Nicolas's comments. Created 4 years, 1 month 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_PARSER_H_ 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PARSER_H_
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PARSER_H_ 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PARSER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 22 matching lines...) Expand all
33 // Decodes the chunk of data representing a TemplateURL, creates the 33 // Decodes the chunk of data representing a TemplateURL, creates the
34 // TemplateURL, and returns it. Returns null if the data does not describe a 34 // TemplateURL, and returns it. Returns null if the data does not describe a
35 // valid TemplateURL, the URLs referenced do not point to valid http/https 35 // valid TemplateURL, the URLs referenced do not point to valid http/https
36 // resources, or for some other reason we do not support the described 36 // resources, or for some other reason we do not support the described
37 // TemplateURL. |parameter_filter| can be used if you want to filter some 37 // TemplateURL. |parameter_filter| can be used if you want to filter some
38 // parameters out of the URL. For example, when importing from another 38 // parameters out of the URL. For example, when importing from another
39 // browser, we remove any parameter identifying that browser. If set to null, 39 // browser, we remove any parameter identifying that browser. If set to null,
40 // the URL is not modified. 40 // the URL is not modified.
41 static std::unique_ptr<TemplateURL> Parse( 41 static std::unique_ptr<TemplateURL> Parse(
42 const SearchTermsData& search_terms_data, 42 const SearchTermsData& search_terms_data,
43 bool show_in_default_list,
44 const char* data, 43 const char* data,
45 size_t length, 44 size_t length,
46 ParameterFilter* parameter_filter); 45 ParameterFilter* parameter_filter);
47 46
48 private: 47 private:
49 // No one should create one of these. 48 // No one should create one of these.
50 TemplateURLParser(); 49 TemplateURLParser();
51 50
52 DISALLOW_COPY_AND_ASSIGN(TemplateURLParser); 51 DISALLOW_COPY_AND_ASSIGN(TemplateURLParser);
53 }; 52 };
54 53
55 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PARSER_H_ 54 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PARSER_H_
OLDNEW
« no previous file with comments | « components/search_engines/template_url_fetcher.cc ('k') | components/search_engines/template_url_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698