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 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2775 return kCountryIDUnknown; | 2775 return kCountryIDUnknown; |
2776 | 2776 |
2777 UniChar isobuf[2]; | 2777 UniChar isobuf[2]; |
2778 CFRange char_range = CFRangeMake(0, 2); | 2778 CFRange char_range = CFRangeMake(0, 2); |
2779 CFStringGetCharacters(country, char_range, isobuf); | 2779 CFStringGetCharacters(country, char_range, isobuf); |
2780 | 2780 |
2781 return CountryCharsToCountryIDWithUpdate(static_cast<char>(isobuf[0]), | 2781 return CountryCharsToCountryIDWithUpdate(static_cast<char>(isobuf[0]), |
2782 static_cast<char>(isobuf[1])); | 2782 static_cast<char>(isobuf[1])); |
2783 } | 2783 } |
2784 | 2784 |
2785 #elif defined(OS_LINUX) | 2785 #elif defined(OS_LINUX) || defined(OS_FREEBSD) |
2786 | 2786 |
2787 int GetCurrentCountryID() { | 2787 int GetCurrentCountryID() { |
2788 NOTIMPLEMENTED(); | 2788 NOTIMPLEMENTED(); |
2789 return kCountryIDUnknown; | 2789 return kCountryIDUnknown; |
2790 } | 2790 } |
2791 | 2791 |
2792 #endif // OS_* | 2792 #endif // OS_* |
2793 | 2793 |
2794 int GetCountryIDFromPrefs(PrefService* prefs) { | 2794 int GetCountryIDFromPrefs(PrefService* prefs) { |
2795 // See if the user overrode the country on the command line. | 2795 // See if the user overrode the country on the command line. |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |