Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 // not used. | 50 // not used. |
| 51 TemplateURL* GetPrepopulatedDefaultSearch(Profile* profile); | 51 TemplateURL* GetPrepopulatedDefaultSearch(Profile* profile); |
| 52 | 52 |
| 53 // Returns the type of the matching engine, or SEARCH_ENGINE_OTHER if no engines | 53 // Returns the type of the matching engine, or SEARCH_ENGINE_OTHER if no engines |
| 54 // match. This uses same-origin checks unless the |url| is a Google seach URL, | 54 // match. This uses same-origin checks unless the |url| is a Google seach URL, |
| 55 // in which case we'll identify any valid Google hostname as "Google". | 55 // in which case we'll identify any valid Google hostname as "Google". |
| 56 // | 56 // |
| 57 // NOTE: Must be called on the UI thread. | 57 // NOTE: Must be called on the UI thread. |
| 58 SearchEngineType GetEngineType(const std::string& url); | 58 SearchEngineType GetEngineType(const std::string& url); |
| 59 | 59 |
| 60 // Returns the logo at the specified |size| for |template_url|. If no logo is | |
| 61 // known, this will return an empty GURL. | |
| 62 // | |
| 63 // NOTE: Must be called on the UI thread. | |
| 64 enum LogoSize { | |
|
msw
2012/08/28 18:22:00
nit: define the enum at line 24, keep the comment
samarth
2012/08/28 21:22:46
Done.
| |
| 65 SIZE_100_PERCENT, | |
|
msw
2012/08/28 18:22:00
nit: TemplateURLPrepopulateData::SIZE_100_PERCENT
samarth
2012/08/28 21:22:46
Done.
| |
| 66 SIZE_200_PERCENT, | |
| 67 }; | |
| 68 GURL GetLogoURL(const TemplateURL& url, LogoSize size); | |
|
msw
2012/08/28 18:22:00
nit: s/url/template_url/ or change the comment's u
samarth
2012/08/28 21:22:46
Done.
| |
| 69 | |
| 60 } // namespace TemplateURLPrepopulateData | 70 } // namespace TemplateURLPrepopulateData |
| 61 | 71 |
| 62 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ | 72 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ |
| OLD | NEW |