| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/search_engines/template_url.h" | 9 #include "chrome/browser/search_engines/template_url.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 "windows-1250", | 1625 "windows-1250", |
| 1626 NULL, | 1626 NULL, |
| 1627 58, | 1627 58, |
| 1628 }; | 1628 }; |
| 1629 | 1629 |
| 1630 const PrepopulatedEngine tapuz = { | 1630 const PrepopulatedEngine tapuz = { |
| 1631 L"\x05ea\x05e4\x05d5\x05d6 \x05d0\x05e0\x05e9\x05d9\x05dd", | 1631 L"\x05ea\x05e4\x05d5\x05d6 \x05d0\x05e0\x05e9\x05d9\x05dd", |
| 1632 L"tapuz.co.il", | 1632 L"tapuz.co.il", |
| 1633 "http://www.tapuz.co.il/favicon.ico", | 1633 "http://www.tapuz.co.il/favicon.ico", |
| 1634 L"http://www.tapuz.co.il/search/search.asp?q={searchTerms}", | 1634 L"http://www.tapuz.co.il/search/search.asp?q={searchTerms}", |
| 1635 "windows-1255", | 1635 "UTF-8", |
| 1636 NULL, | 1636 NULL, |
| 1637 57, | 1637 57, |
| 1638 }; | 1638 }; |
| 1639 | 1639 |
| 1640 const PrepopulatedEngine terra_ar = { | 1640 const PrepopulatedEngine terra_ar = { |
| 1641 L"Terra Argentina", | 1641 L"Terra Argentina", |
| 1642 L"terra.com.ar", | 1642 L"terra.com.ar", |
| 1643 "http://buscar.terra.com.ar/favicon.ico", | 1643 "http://buscar.terra.com.ar/favicon.ico", |
| 1644 L"http://buscar.terra.com.ar/Default.aspx?query={searchTerms}&source=Search", | 1644 L"http://buscar.terra.com.ar/Default.aspx?query={searchTerms}&source=Search", |
| 1645 "ISO-8859-1", | 1645 "ISO-8859-1", |
| (...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3179 } // namespace | 3179 } // namespace |
| 3180 | 3180 |
| 3181 namespace TemplateURLPrepopulateData { | 3181 namespace TemplateURLPrepopulateData { |
| 3182 | 3182 |
| 3183 void RegisterUserPrefs(PrefService* prefs) { | 3183 void RegisterUserPrefs(PrefService* prefs) { |
| 3184 prefs->RegisterIntegerPref(prefs::kGeoIDAtInstall, -1); | 3184 prefs->RegisterIntegerPref(prefs::kGeoIDAtInstall, -1); |
| 3185 prefs->RegisterIntegerPref(prefs::kCountryIDAtInstall, kCountryIDUnknown); | 3185 prefs->RegisterIntegerPref(prefs::kCountryIDAtInstall, kCountryIDUnknown); |
| 3186 } | 3186 } |
| 3187 | 3187 |
| 3188 int GetDataVersion() { | 3188 int GetDataVersion() { |
| 3189 return 19; // Increment this if you change the above data in ways that mean | 3189 return 20; // Increment this if you change the above data in ways that mean |
| 3190 // users with existing data should get a new version. | 3190 // users with existing data should get a new version. |
| 3191 } | 3191 } |
| 3192 | 3192 |
| 3193 void GetPrepopulatedEngines(PrefService* prefs, | 3193 void GetPrepopulatedEngines(PrefService* prefs, |
| 3194 std::vector<TemplateURL*>* t_urls, | 3194 std::vector<TemplateURL*>* t_urls, |
| 3195 size_t* default_search_provider_index) { | 3195 size_t* default_search_provider_index) { |
| 3196 const PrepopulatedEngine** engines; | 3196 const PrepopulatedEngine** engines; |
| 3197 size_t num_engines; | 3197 size_t num_engines; |
| 3198 GetPrepopulationSetFromCountryID(prefs, &engines, &num_engines); | 3198 GetPrepopulationSetFromCountryID(prefs, &engines, &num_engines); |
| 3199 *default_search_provider_index = 0; | 3199 *default_search_provider_index = 0; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3215 new_turl->set_date_created(Time()); | 3215 new_turl->set_date_created(Time()); |
| 3216 std::vector<std::string> turl_encodings; | 3216 std::vector<std::string> turl_encodings; |
| 3217 turl_encodings.push_back(engines[i]->encoding); | 3217 turl_encodings.push_back(engines[i]->encoding); |
| 3218 new_turl->set_input_encodings(turl_encodings); | 3218 new_turl->set_input_encodings(turl_encodings); |
| 3219 new_turl->set_prepopulate_id(engines[i]->id); | 3219 new_turl->set_prepopulate_id(engines[i]->id); |
| 3220 t_urls->push_back(new_turl); | 3220 t_urls->push_back(new_turl); |
| 3221 } | 3221 } |
| 3222 } | 3222 } |
| 3223 | 3223 |
| 3224 } // namespace TemplateURLPrepopulateData | 3224 } // namespace TemplateURLPrepopulateData |
| OLD | NEW |