| 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 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2212 "http://vn.search.yahoo.com/favicon.ico", | 2212 "http://vn.search.yahoo.com/favicon.ico", |
| 2213 L"http://vn.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" | 2213 L"http://vn.search.yahoo.com/search?ei={inputEncoding}&fr=crmas&" |
| 2214 L"p={searchTerms}", | 2214 L"p={searchTerms}", |
| 2215 "UTF-8", | 2215 "UTF-8", |
| 2216 L"http://vn-sayt.ff.search.yahoo.com/gossip-vn-sayt?output=fxjson&" | 2216 L"http://vn-sayt.ff.search.yahoo.com/gossip-vn-sayt?output=fxjson&" |
| 2217 L"command={searchTerms}", | 2217 L"command={searchTerms}", |
| 2218 2, | 2218 2, |
| 2219 }; | 2219 }; |
| 2220 | 2220 |
| 2221 const PrepopulatedEngine yam = { | 2221 const PrepopulatedEngine yam = { |
| 2222 L"\u5929\u7a7a", | 2222 L"\x5929\x7a7a", |
| 2223 L"yam.com", | 2223 L"yam.com", |
| 2224 "http://www.yam.com/i/8/sky.ico", | 2224 "http://www.yam.com/i/8/sky.ico", |
| 2225 L"http://search.yam.com/wps?k={searchTerms}", | 2225 L"http://search.yam.com/wps?k={searchTerms}", |
| 2226 "Big5", | 2226 "Big5", |
| 2227 NULL, | 2227 NULL, |
| 2228 23, | 2228 23, |
| 2229 }; | 2229 }; |
| 2230 | 2230 |
| 2231 const PrepopulatedEngine yamli = { | 2231 const PrepopulatedEngine yamli = { |
| 2232 L"Yamli", | 2232 L"Yamli", |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3178 } // namespace | 3178 } // namespace |
| 3179 | 3179 |
| 3180 namespace TemplateURLPrepopulateData { | 3180 namespace TemplateURLPrepopulateData { |
| 3181 | 3181 |
| 3182 void RegisterUserPrefs(PrefService* prefs) { | 3182 void RegisterUserPrefs(PrefService* prefs) { |
| 3183 prefs->RegisterIntegerPref(prefs::kGeoIDAtInstall, -1); | 3183 prefs->RegisterIntegerPref(prefs::kGeoIDAtInstall, -1); |
| 3184 prefs->RegisterIntegerPref(prefs::kCountryIDAtInstall, kCountryIDUnknown); | 3184 prefs->RegisterIntegerPref(prefs::kCountryIDAtInstall, kCountryIDUnknown); |
| 3185 } | 3185 } |
| 3186 | 3186 |
| 3187 int GetDataVersion() { | 3187 int GetDataVersion() { |
| 3188 return 22; // Increment this if you change the above data in ways that mean | 3188 return 23; // Increment this if you change the above data in ways that mean |
| 3189 // users with existing data should get a new version. | 3189 // users with existing data should get a new version. |
| 3190 } | 3190 } |
| 3191 | 3191 |
| 3192 void GetPrepopulatedEngines(PrefService* prefs, | 3192 void GetPrepopulatedEngines(PrefService* prefs, |
| 3193 std::vector<TemplateURL*>* t_urls, | 3193 std::vector<TemplateURL*>* t_urls, |
| 3194 size_t* default_search_provider_index) { | 3194 size_t* default_search_provider_index) { |
| 3195 const PrepopulatedEngine** engines; | 3195 const PrepopulatedEngine** engines; |
| 3196 size_t num_engines; | 3196 size_t num_engines; |
| 3197 GetPrepopulationSetFromCountryID(prefs, &engines, &num_engines); | 3197 GetPrepopulationSetFromCountryID(prefs, &engines, &num_engines); |
| 3198 *default_search_provider_index = 0; | 3198 *default_search_provider_index = 0; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3214 new_turl->set_date_created(Time()); | 3214 new_turl->set_date_created(Time()); |
| 3215 std::vector<std::string> turl_encodings; | 3215 std::vector<std::string> turl_encodings; |
| 3216 turl_encodings.push_back(engines[i]->encoding); | 3216 turl_encodings.push_back(engines[i]->encoding); |
| 3217 new_turl->set_input_encodings(turl_encodings); | 3217 new_turl->set_input_encodings(turl_encodings); |
| 3218 new_turl->set_prepopulate_id(engines[i]->id); | 3218 new_turl->set_prepopulate_id(engines[i]->id); |
| 3219 t_urls->push_back(new_turl); | 3219 t_urls->push_back(new_turl); |
| 3220 } | 3220 } |
| 3221 } | 3221 } |
| 3222 | 3222 |
| 3223 } // namespace TemplateURLPrepopulateData | 3223 } // namespace TemplateURLPrepopulateData |
| OLD | NEW |