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.h" | 5 #include "chrome/browser/search_engines/template_url.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
10 #include "base/i18n/icu_string_conversions.h" | 10 #include "base/i18n/icu_string_conversions.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
14 #include "base/string_util.h" | |
15 #include "base/stringprintf.h" | |
16 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "chrome/browser/google/google_util.h" | 18 #include "chrome/browser/google/google_util.h" |
19 #include "chrome/browser/search_engines/search_terms_data.h" | 19 #include "chrome/browser/search_engines/search_terms_data.h" |
20 #include "chrome/browser/search_engines/template_url_service.h" | 20 #include "chrome/browser/search_engines/template_url_service.h" |
21 #include "chrome/common/url_constants.h" | 21 #include "chrome/common/url_constants.h" |
22 #include "extensions/common/constants.h" | 22 #include "extensions/common/constants.h" |
23 #include "google_apis/google_api_keys.h" | 23 #include "google_apis/google_api_keys.h" |
24 #include "net/base/escape.h" | 24 #include "net/base/escape.h" |
25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
26 | 26 |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 // patterns. This means that given patterns | 1012 // patterns. This means that given patterns |
1013 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], | 1013 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], |
1014 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would | 1014 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would |
1015 // return false. This is important for at least Google, where such URLs | 1015 // return false. This is important for at least Google, where such URLs |
1016 // are invalid. | 1016 // are invalid. |
1017 return !search_terms->empty(); | 1017 return !search_terms->empty(); |
1018 } | 1018 } |
1019 } | 1019 } |
1020 return false; | 1020 return false; |
1021 } | 1021 } |
OLD | NEW |