Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: chrome/browser/template_url_prepopulate_data.cc

Issue 8802: Update prepopulate data by request for a couple different issues.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/views/keyword_editor_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/template_url_prepopulate_data.h" 5 #include "chrome/browser/template_url_prepopulate_data.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/template_url.h" 8 #include "chrome/browser/template_url.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 27 matching lines...) Expand all
38 // 38 //
39 // This ID must be "unique" within one country's prepopulated data, but two 39 // This ID must be "unique" within one country's prepopulated data, but two
40 // entries can share an ID if they represent the "same" engine (e.g. Yahoo! US 40 // entries can share an ID if they represent the "same" engine (e.g. Yahoo! US
41 // vs. Yahoo! UK) and will not appear in the same user-visible data set. This 41 // vs. Yahoo! UK) and will not appear in the same user-visible data set. This
42 // facilitates changes like adding more specific per-country data in the 42 // facilitates changes like adding more specific per-country data in the
43 // future; in such a case the localized engines will transparently replace the 43 // future; in such a case the localized engines will transparently replace the
44 // previous, non-localized versions. For engines where we need two instances 44 // previous, non-localized versions. For engines where we need two instances
45 // to appear for one country (e.g. Live Search U.S. English and Spanish), we 45 // to appear for one country (e.g. Live Search U.S. English and Spanish), we
46 // must use two different unique IDs (and different keywords). 46 // must use two different unique IDs (and different keywords).
47 // 47 //
48 // The following unique IDs are available: 92, 93, 103+ 48 // The following unique IDs are available: 66, 93, 103+
49 // NOTE: CHANGE THE ABOVE NUMBERS IF YOU ADD A NEW ENGINE; ID conflicts = bad! 49 // NOTE: CHANGE THE ABOVE NUMBERS IF YOU ADD A NEW ENGINE; ID conflicts = bad!
50 const int id; 50 const int id;
51 }; 51 };
52 52
53 const PrepopulatedEngine abcsok = { 53 const PrepopulatedEngine abcsok = {
54 L"ABC S\x00f8k", 54 L"ABC S\x00f8k",
55 L"abcsok.no", 55 L"abcsok.no",
56 L"http://abcsok.no/favicon.ico", 56 L"http://abcsok.no/favicon.ico",
57 L"http://abcsok.no/index.html?q={searchTerms}", 57 L"http://abcsok.no/index.html?q={searchTerms}",
58 "UTF-8", 58 "UTF-8",
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 L"GO.com", 462 L"GO.com",
463 L"go.com", 463 L"go.com",
464 L"http://search.yahoo.com/favicon.ico", 464 L"http://search.yahoo.com/favicon.ico",
465 L"http://search.yahoo.com/search?ei={inputEncoding}&p={searchTerms}&" 465 L"http://search.yahoo.com/search?ei={inputEncoding}&p={searchTerms}&"
466 L"fr=hsusgo1", 466 L"fr=hsusgo1",
467 "ISO-8859-1", 467 "ISO-8859-1",
468 NULL, 468 NULL,
469 40, 469 40,
470 }; 470 };
471 471
472 const PrepopulatedEngine goo = {
473 L"goo",
474 L"goo.ne.jp",
475 L"http://goo.ne.jp/gooicon.ico",
476 L"http://search.goo.ne.jp/web.jsp?MT={searchTerms}&IE={inputEncoding}",
477 "UTF-8",
478 NULL,
479 92,
480 };
481
472 const PrepopulatedEngine google = { 482 const PrepopulatedEngine google = {
473 L"Google", 483 L"Google",
474 NULL, 484 NULL,
475 L"http://www.google.com/favicon.ico", 485 L"http://www.google.com/favicon.ico",
476 L"{google:baseURL}search?{google:RLZ}{google:acceptedSuggestion}" 486 L"{google:baseURL}search?{google:RLZ}{google:acceptedSuggestion}"
477 L"{google:originalQueryForSuggestion}sourceid=chrome&ie={inputEncoding}&" 487 L"{google:originalQueryForSuggestion}sourceid=chrome&ie={inputEncoding}&"
478 L"q={searchTerms}", 488 L"q={searchTerms}",
479 "UTF-8", 489 "UTF-8",
480 L"{google:baseSuggestURL}search?client=chrome&output=chrome&hl={language}&" 490 L"{google:baseSuggestURL}search?client=chrome&output=chrome&hl={language}&"
481 L"q={searchTerms}", 491 L"q={searchTerms}",
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 const PrepopulatedEngine in = { 525 const PrepopulatedEngine in = {
516 L"in.gr", 526 L"in.gr",
517 L"in.gr", 527 L"in.gr",
518 L"http://www.in.gr/favicon.ico", 528 L"http://www.in.gr/favicon.ico",
519 L"http://find.in.gr/result.asp?q={searchTerms}", 529 L"http://find.in.gr/result.asp?q={searchTerms}",
520 "ISO-8859-7", 530 "ISO-8859-7",
521 NULL, 531 NULL,
522 54, 532 54,
523 }; 533 };
524 534
525 const PrepopulatedEngine infoseek = {
526 L"Infoseek",
527 L"infoseek.co.jp",
528 L"http://search.www.infoseek.co.jp/favicon.ico",
529 L"http://search.www.infoseek.co.jp/Web?qt={searchTerms}&enc={inputEncoding}",
530 "EUC-JP",
531 NULL,
532 66,
533 };
534
535 const PrepopulatedEngine jabse = { 535 const PrepopulatedEngine jabse = {
536 L"Jabse", 536 L"Jabse",
537 L"jabse.com", 537 L"jabse.com",
538 L"http://www.jabse.com/favicon.ico", 538 L"http://www.jabse.com/favicon.ico",
539 L"http://www.jabse.com/searchmachine.php?query={searchTerms}", 539 L"http://www.jabse.com/searchmachine.php?query={searchTerms}",
540 "UTF-8", 540 "UTF-8",
541 NULL, 541 NULL,
542 19, 542 19,
543 }; 543 };
544 544
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 L"http://szm.sk/search/?co=1&q={searchTerms}", 1596 L"http://szm.sk/search/?co=1&q={searchTerms}",
1597 "windows-1250", 1597 "windows-1250",
1598 NULL, 1598 NULL,
1599 86, 1599 86,
1600 }; 1600 };
1601 1601
1602 const PrepopulatedEngine t_online = { 1602 const PrepopulatedEngine t_online = {
1603 L"T-Online", 1603 L"T-Online",
1604 L"suche.t-online.de", 1604 L"suche.t-online.de",
1605 L"http://suche.t-online.de/favicon.ico", 1605 L"http://suche.t-online.de/favicon.ico",
1606 L"http://suche.t-online.de/fast-cgi/tsc?q={searchTerms}", 1606 L"http://suche.t-online.de/fast-cgi/tsc?sr=chrome&q={searchTerms}",
1607 "UTF-8", 1607 "UTF-8",
1608 NULL, 1608 NULL,
1609 49, 1609 49,
1610 }; 1610 };
1611 1611
1612 const PrepopulatedEngine tango = { 1612 const PrepopulatedEngine tango = {
1613 L"Tango", 1613 L"Tango",
1614 L"tango.hu", 1614 L"tango.hu",
1615 L"http://tango.hu/favicon.ico", 1615 L"http://tango.hu/favicon.ico",
1616 L"http://tango.hu/search.php?q={searchTerms}", 1616 L"http://tango.hu/search.php?q={searchTerms}",
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 // Jamaica 2418 // Jamaica
2419 const PrepopulatedEngine* engines_JM[] = 2419 const PrepopulatedEngine* engines_JM[] =
2420 { &google, &jamaicalive, &yahoo, &live, &go, &aol, }; 2420 { &google, &jamaicalive, &yahoo, &live, &go, &aol, };
2421 2421
2422 // Jordan 2422 // Jordan
2423 const PrepopulatedEngine* engines_JO[] = 2423 const PrepopulatedEngine* engines_JO[] =
2424 { &google, &maktoob, &yamli, &yahoo, &araby, &msn_en_XA, &msn_ar_XA, }; 2424 { &google, &maktoob, &yamli, &yahoo, &araby, &msn_en_XA, &msn_ar_XA, };
2425 2425
2426 // Japan 2426 // Japan
2427 const PrepopulatedEngine* engines_JP[] = 2427 const PrepopulatedEngine* engines_JP[] =
2428 { &google, &yahoo_jp, &msn_ja_JP, &biglobe, &nifty, &infoseek, }; 2428 { &google, &yahoo_jp, &msn_ja_JP, &biglobe, &goo, &nifty, };
2429 2429
2430 // Kenya 2430 // Kenya
2431 const PrepopulatedEngine* engines_KE[] = { &google, &yahoo, &msn, }; 2431 const PrepopulatedEngine* engines_KE[] = { &google, &yahoo, &msn, };
2432 2432
2433 // Kuwait 2433 // Kuwait
2434 const PrepopulatedEngine* engines_KW[] = 2434 const PrepopulatedEngine* engines_KW[] =
2435 { &google, &maktoob, &yahoo, &yamli, &araby, &msn_en_XA, &msn_ar_XA, }; 2435 { &google, &maktoob, &yahoo, &yamli, &araby, &msn_en_XA, &msn_ar_XA, };
2436 2436
2437 // South Korea 2437 // South Korea
2438 const PrepopulatedEngine* engines_KR[] = 2438 const PrepopulatedEngine* engines_KR[] =
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 2999
3000 } // namespace 3000 } // namespace
3001 3001
3002 namespace TemplateURLPrepopulateData { 3002 namespace TemplateURLPrepopulateData {
3003 3003
3004 void RegisterUserPrefs(PrefService* prefs) { 3004 void RegisterUserPrefs(PrefService* prefs) {
3005 prefs->RegisterIntegerPref(prefs::kGeoIDAtInstall, -1); 3005 prefs->RegisterIntegerPref(prefs::kGeoIDAtInstall, -1);
3006 } 3006 }
3007 3007
3008 int GetDataVersion() { 3008 int GetDataVersion() {
3009 return 16; // Increment this if you change the above data in ways that mean 3009 return 17; // Increment this if you change the above data in ways that mean
3010 // users with existing data should get a new version. 3010 // users with existing data should get a new version.
3011 } 3011 }
3012 3012
3013 void GetPrepopulatedEngines(PrefService* prefs, 3013 void GetPrepopulatedEngines(PrefService* prefs,
3014 std::vector<TemplateURL*>* t_urls, 3014 std::vector<TemplateURL*>* t_urls,
3015 size_t* default_search_provider_index) { 3015 size_t* default_search_provider_index) {
3016 // TODO(pkasting): http://b/1225464 GeoID is not available on Win2k. We'll 3016 // TODO(pkasting): http://b/1225464 GeoID is not available on Win2k. We'll
3017 // need to do something else there. 3017 // need to do something else there.
3018 const PrepopulatedEngine** engines; 3018 const PrepopulatedEngine** engines;
3019 size_t num_engines; 3019 size_t num_engines;
(...skipping 17 matching lines...) Expand all
3037 new_turl->set_date_created(Time()); 3037 new_turl->set_date_created(Time());
3038 std::vector<std::string> turl_encodings; 3038 std::vector<std::string> turl_encodings;
3039 turl_encodings.push_back(engines[i]->encoding); 3039 turl_encodings.push_back(engines[i]->encoding);
3040 new_turl->set_input_encodings(turl_encodings); 3040 new_turl->set_input_encodings(turl_encodings);
3041 new_turl->set_prepopulate_id(engines[i]->id); 3041 new_turl->set_prepopulate_id(engines[i]->id);
3042 t_urls->push_back(new_turl); 3042 t_urls->push_back(new_turl);
3043 } 3043 }
3044 } 3044 }
3045 3045
3046 } // namespace TemplateURLPrepopulateData 3046 } // namespace TemplateURLPrepopulateData
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/keyword_editor_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698