| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 8 #include <locale.h> | 8 #include <locale.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "chrome/browser/search_engines/template_url.h" | 18 #include "chrome/browser/search_engines/template_url.h" |
| 19 #include "chrome/common/pref_names.h" | |
| 20 #include "components/google/core/browser/google_util.h" | 19 #include "components/google/core/browser/google_util.h" |
| 21 #include "components/pref_registry/pref_registry_syncable.h" | 20 #include "components/pref_registry/pref_registry_syncable.h" |
| 22 #include "components/search_engines/prepopulated_engines.h" | 21 #include "components/search_engines/prepopulated_engines.h" |
| 22 #include "components/search_engines/search_engines_pref_names.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
| 25 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
| 26 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 26 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
| 28 #include "url/gurl.h" | 28 #include "url/gurl.h" |
| 29 | 29 |
| 30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 31 #undef IN // On Windows, windef.h defines this, which screws up "India" cases. | 31 #undef IN // On Windows, windef.h defines this, which screws up "India" cases. |
| 32 #elif defined(OS_MACOSX) | 32 #elif defined(OS_MACOSX) |
| (...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 for (size_t j = 0; j < kAllEngines[i]->alternate_urls_size; ++j) { | 1316 for (size_t j = 0; j < kAllEngines[i]->alternate_urls_size; ++j) { |
| 1317 if (SameDomain(url, GURL(kAllEngines[i]->alternate_urls[j]))) | 1317 if (SameDomain(url, GURL(kAllEngines[i]->alternate_urls[j]))) |
| 1318 return kAllEngines[i]->type; | 1318 return kAllEngines[i]->type; |
| 1319 } | 1319 } |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 return SEARCH_ENGINE_OTHER; | 1322 return SEARCH_ENGINE_OTHER; |
| 1323 } | 1323 } |
| 1324 | 1324 |
| 1325 } // namespace TemplateURLPrepopulateData | 1325 } // namespace TemplateURLPrepopulateData |
| OLD | NEW |