| 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 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 5 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 
| 6 | 6 | 
| 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 
| 8 #include <locale.h> | 8 #include <locale.h> | 
| 9 #endif | 9 #endif | 
| 10 | 10 | 
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1198 TemplateURL* MakePrepopulatedTemplateURLFromPrepopulateEngine( | 1198 TemplateURL* MakePrepopulatedTemplateURLFromPrepopulateEngine( | 
| 1199     Profile* profile, | 1199     Profile* profile, | 
| 1200     const PrepopulatedEngine& engine) { | 1200     const PrepopulatedEngine& engine) { | 
| 1201 | 1201 | 
| 1202   ListValue alternate_urls; | 1202   ListValue alternate_urls; | 
| 1203   if (engine.alternate_urls) { | 1203   if (engine.alternate_urls) { | 
| 1204     for (size_t i = 0; i < engine.alternate_urls_size; ++i) | 1204     for (size_t i = 0; i < engine.alternate_urls_size; ++i) | 
| 1205       alternate_urls.AppendString(std::string(engine.alternate_urls[i])); | 1205       alternate_urls.AppendString(std::string(engine.alternate_urls[i])); | 
| 1206   } | 1206   } | 
| 1207 | 1207 | 
| 1208   return MakePrepopulatedTemplateURL(profile, WideToUTF16(engine.name), | 1208   return MakePrepopulatedTemplateURL(profile, base::WideToUTF16(engine.name), | 
| 1209       WideToUTF16(engine.keyword), engine.search_url, engine.suggest_url, | 1209       base::WideToUTF16(engine.keyword), engine.search_url, engine.suggest_url, | 
| 1210       engine.instant_url, engine.favicon_url, engine.encoding, alternate_urls, | 1210       engine.instant_url, engine.favicon_url, engine.encoding, alternate_urls, | 
| 1211       engine.search_terms_replacement_key, engine.id); | 1211       engine.search_terms_replacement_key, engine.id); | 
| 1212 } | 1212 } | 
| 1213 | 1213 | 
| 1214 void GetPrepopulatedEngines(Profile* profile, | 1214 void GetPrepopulatedEngines(Profile* profile, | 
| 1215                             std::vector<TemplateURL*>* t_urls, | 1215                             std::vector<TemplateURL*>* t_urls, | 
| 1216                             size_t* default_search_provider_index) { | 1216                             size_t* default_search_provider_index) { | 
| 1217   // If there is a set of search engines in the preferences file, it overrides | 1217   // If there is a set of search engines in the preferences file, it overrides | 
| 1218   // the built-in set. | 1218   // the built-in set. | 
| 1219   *default_search_provider_index = 0; | 1219   *default_search_provider_index = 0; | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1288 GURL GetLogoURL(const TemplateURL& template_url, LogoSize size) { | 1288 GURL GetLogoURL(const TemplateURL& template_url, LogoSize size) { | 
| 1289   if (GetEngineType(template_url.url()) == SEARCH_ENGINE_GOOGLE) { | 1289   if (GetEngineType(template_url.url()) == SEARCH_ENGINE_GOOGLE) { | 
| 1290     return GURL((size == LOGO_200_PERCENT) ? | 1290     return GURL((size == LOGO_200_PERCENT) ? | 
| 1291                 google_logos.logo_200_percent_url : | 1291                 google_logos.logo_200_percent_url : | 
| 1292                 google_logos.logo_100_percent_url); | 1292                 google_logos.logo_100_percent_url); | 
| 1293   } | 1293   } | 
| 1294   return GURL(); | 1294   return GURL(); | 
| 1295 } | 1295 } | 
| 1296 | 1296 | 
| 1297 }  // namespace TemplateURLPrepopulateData | 1297 }  // namespace TemplateURLPrepopulateData | 
| OLD | NEW | 
|---|