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

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

Issue 20075: Fix compiler warning that breaks build since warnings are errors. (Closed)
Patch Set: Created 11 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | 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/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 2671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2682 inline int CountryCharsToCountryID(char c1, char c2) { 2682 inline int CountryCharsToCountryID(char c1, char c2) {
2683 return c1 << 8 | c2; 2683 return c1 << 8 | c2;
2684 } 2684 }
2685 2685
2686 int CountryCharsToCountryIDWithUpdate(char c1, char c2) { 2686 int CountryCharsToCountryIDWithUpdate(char c1, char c2) {
2687 // SPECIAL CASE: In 2003, Yugoslavia renamed itself to Serbia and Montenegro. 2687 // SPECIAL CASE: In 2003, Yugoslavia renamed itself to Serbia and Montenegro.
2688 // Serbia and Montenegro dissolved their union in June 2006. Yugoslavia was 2688 // Serbia and Montenegro dissolved their union in June 2006. Yugoslavia was
2689 // ISO 'YU' and Serbia and Montenegro were ISO 'CS'. Serbia was subsequently 2689 // ISO 'YU' and Serbia and Montenegro were ISO 'CS'. Serbia was subsequently
2690 // issued 'RS' and Montenegro 'ME'. Windows XP and Mac OS X Leopard still use 2690 // issued 'RS' and Montenegro 'ME'. Windows XP and Mac OS X Leopard still use
2691 // the value 'YU'. If we get a value of 'YU' or 'CS' we will map it to 'RS'. 2691 // the value 'YU'. If we get a value of 'YU' or 'CS' we will map it to 'RS'.
2692 if (c1 == 'Y' && c2 == 'U' || 2692 if ((c1 == 'Y' && c2 == 'U') ||
2693 c1 == 'C' && c2 == 'S') { 2693 (c1 == 'C' && c2 == 'S')) {
2694 c1 = 'R'; 2694 c1 = 'R';
2695 c2 = 'S'; 2695 c2 = 'S';
2696 } 2696 }
2697 2697
2698 // SPECIAL CASE: Timor-Leste changed from 'TP' to 'TL' in 2002. Windows XP 2698 // SPECIAL CASE: Timor-Leste changed from 'TP' to 'TL' in 2002. Windows XP
2699 // predates this; we therefore map this value. 2699 // predates this; we therefore map this value.
2700 if (c1 == 'T' && c2 == 'P') 2700 if (c1 == 'T' && c2 == 'P')
2701 c2 = 'L'; 2701 c2 = 'L';
2702 2702
2703 return CountryCharsToCountryID(c1, c2); 2703 return CountryCharsToCountryID(c1, c2);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698