OLD | NEW |
---|---|
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_PREPOPULATE_DATA_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ |
6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 24 matching lines...) Expand all Loading... | |
35 // file then it returns the version specified there. | 35 // file then it returns the version specified there. |
36 int GetDataVersion(PrefService* prefs); | 36 int GetDataVersion(PrefService* prefs); |
37 | 37 |
38 // Returns the prepopulated URLs for the current country. | 38 // Returns the prepopulated URLs for the current country. |
39 // |default_search_provider_index| is set to the index of the default search | 39 // |default_search_provider_index| is set to the index of the default search |
40 // provider within the returned vector. | 40 // provider within the returned vector. |
41 std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines( | 41 std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines( |
42 PrefService* prefs, | 42 PrefService* prefs, |
43 size_t* default_search_provider_index); | 43 size_t* default_search_provider_index); |
44 | 44 |
45 // Find the prepopulated search engine with the given id. | |
Peter Kasting
2016/12/22 20:49:04
Nit: Find -> Returns, id -> |prepopulate_id|
Alexander Yashkin
2016/12/23 19:44:09
Done
| |
46 std::unique_ptr<TemplateURLData> GetPrepopulatedEngine(PrefService* prefs, | |
47 int prepopulated_id); | |
48 | |
45 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
46 // Returns the prepopulated URLs associated with |locale|, if it differs from | 50 // Returns the prepopulated URLs associated with |locale|, if it differs from |
47 // the current country. |locale| should be a two-character uppercase ISO 3166-1 | 51 // the current country. |locale| should be a two-character uppercase ISO 3166-1 |
48 // country code. If the given locale is the same as the existing locale, returns | 52 // country code. If the given locale is the same as the existing locale, returns |
49 // an empty vector. | 53 // an empty vector. |
50 std::vector<std::unique_ptr<TemplateURLData>> GetLocalPrepopulatedEngines( | 54 std::vector<std::unique_ptr<TemplateURLData>> GetLocalPrepopulatedEngines( |
51 const std::string& locale, | 55 const std::string& locale, |
52 PrefService* prefs); | 56 PrefService* prefs); |
53 #endif | 57 #endif |
54 | 58 |
(...skipping 18 matching lines...) Expand all Loading... | |
73 // of search engines when user switches device region settings. For use on iOS | 77 // of search engines when user switches device region settings. For use on iOS |
74 // only. | 78 // only. |
75 // TODO(ios): Once user can customize search engines ( http://crbug.com/153047 ) | 79 // TODO(ios): Once user can customize search engines ( http://crbug.com/153047 ) |
76 // this declaration should be removed and the definition in the .cc file be | 80 // this declaration should be removed and the definition in the .cc file be |
77 // moved back to the anonymous namespace. | 81 // moved back to the anonymous namespace. |
78 int GetCurrentCountryID(); | 82 int GetCurrentCountryID(); |
79 | 83 |
80 } // namespace TemplateURLPrepopulateData | 84 } // namespace TemplateURLPrepopulateData |
81 | 85 |
82 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ | 86 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ |
OLD | NEW |