OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/search_engines/template_url.h" | 5 #include "components/search_engines/template_url.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "base/command_line.h" | 10 #include "base/command_line.h" |
12 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
13 #include "base/i18n/icu_string_conversions.h" | 12 #include "base/i18n/icu_string_conversions.h" |
14 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
15 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" |
16 #include "base/metrics/field_trial.h" | 16 #include "base/metrics/field_trial.h" |
17 #include "base/rand_util.h" | 17 #include "base/rand_util.h" |
18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
19 #include "base/strings/string_piece.h" | 19 #include "base/strings/string_piece.h" |
20 #include "base/strings/string_split.h" | 20 #include "base/strings/string_split.h" |
21 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
| 24 #include "build/build_config.h" |
24 #include "components/google/core/browser/google_util.h" | 25 #include "components/google/core/browser/google_util.h" |
25 #include "components/metrics/proto/omnibox_input_type.pb.h" | 26 #include "components/metrics/proto/omnibox_input_type.pb.h" |
26 #include "components/search_engines/search_engines_switches.h" | 27 #include "components/search_engines/search_engines_switches.h" |
27 #include "components/search_engines/search_terms_data.h" | 28 #include "components/search_engines/search_terms_data.h" |
28 #include "components/url_formatter/url_formatter.h" | 29 #include "components/url_formatter/url_formatter.h" |
29 #include "google_apis/google_api_keys.h" | 30 #include "google_apis/google_api_keys.h" |
30 #include "net/base/escape.h" | 31 #include "net/base/escape.h" |
31 #include "net/base/mime_util.h" | 32 #include "net/base/mime_util.h" |
32 #include "ui/base/device_form_factor.h" | 33 #include "ui/base/device_form_factor.h" |
33 #include "url/gurl.h" | 34 #include "url/gurl.h" |
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 // patterns. This means that given patterns | 1514 // patterns. This means that given patterns |
1514 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], | 1515 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], |
1515 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would | 1516 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would |
1516 // return false. This is important for at least Google, where such URLs | 1517 // return false. This is important for at least Google, where such URLs |
1517 // are invalid. | 1518 // are invalid. |
1518 return !search_terms->empty(); | 1519 return !search_terms->empty(); |
1519 } | 1520 } |
1520 } | 1521 } |
1521 return false; | 1522 return false; |
1522 } | 1523 } |
OLD | NEW |