| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <string> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 class GURL; | 13 class GURL; |
| 13 class PrefService; | 14 class PrefService; |
| 14 class TemplateURL; | 15 class TemplateURL; |
| 15 | 16 |
| 16 namespace TemplateURLPrepopulateData { | 17 namespace TemplateURLPrepopulateData { |
| 17 | 18 |
| 18 extern const int kMaxPrepopulatedEngineID; | 19 extern const int kMaxPrepopulatedEngineID; |
| 19 | 20 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 TemplateURL* GetPrepopulatedDefaultSearch(PrefService* prefs); | 38 TemplateURL* GetPrepopulatedDefaultSearch(PrefService* prefs); |
| 38 | 39 |
| 39 // Returns a TemplateURL from the prepopulated data which has the same origin | 40 // Returns a TemplateURL from the prepopulated data which has the same origin |
| 40 // as the given url. The caller is responsible for deleting the returned | 41 // as the given url. The caller is responsible for deleting the returned |
| 41 // TemplateURL. | 42 // TemplateURL. |
| 42 TemplateURL* GetEngineForOrigin(PrefService* prefs, const GURL& url_to_find); | 43 TemplateURL* GetEngineForOrigin(PrefService* prefs, const GURL& url_to_find); |
| 43 | 44 |
| 44 // Returns search engine logo for URLs known to have a search engine logo. | 45 // Returns search engine logo for URLs known to have a search engine logo. |
| 45 int GetSearchEngineLogo(const GURL& url_to_find); | 46 int GetSearchEngineLogo(const GURL& url_to_find); |
| 46 | 47 |
| 48 // Returns the prepopulated search provider whose search URL matches |
| 49 // |search_url| or NULL if none is found. The caller is responsible for |
| 50 // deleting the returned TemplateURL. |
| 51 TemplateURL* FindPrepopulatedEngine(const std::string& search_url); |
| 52 |
| 47 } // namespace TemplateURLPrepopulateData | 53 } // namespace TemplateURLPrepopulateData |
| 48 | 54 |
| 49 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ | 55 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ |
| OLD | NEW |