| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 DCHECK(!i->is_post_param); | 892 DCHECK(!i->is_post_param); |
| 893 HandleReplacement(std::string(), | 893 HandleReplacement(std::string(), |
| 894 search_terms_data.ForceInstantResultsParam( | 894 search_terms_data.ForceInstantResultsParam( |
| 895 search_terms_args.force_instant_results), | 895 search_terms_args.force_instant_results), |
| 896 *i, | 896 *i, |
| 897 &url); | 897 &url); |
| 898 break; | 898 break; |
| 899 | 899 |
| 900 case GOOGLE_INSTANT_EXTENDED_ENABLED: | 900 case GOOGLE_INSTANT_EXTENDED_ENABLED: |
| 901 DCHECK(!i->is_post_param); | 901 DCHECK(!i->is_post_param); |
| 902 HandleReplacement( | 902 HandleReplacement(std::string(), |
| 903 std::string(), search_terms_data.InstantExtendedEnabledParam(), *i, | 903 chrome::InstantExtendedEnabledParam(type_ == SEARCH), |
| 904 &url); | 904 *i, |
| 905 &url); |
| 905 break; | 906 break; |
| 906 | 907 |
| 907 case GOOGLE_NTP_IS_THEMED: | 908 case GOOGLE_NTP_IS_THEMED: |
| 908 DCHECK(!i->is_post_param); | 909 DCHECK(!i->is_post_param); |
| 909 HandleReplacement( | 910 HandleReplacement( |
| 910 std::string(), search_terms_data.NTPIsThemedParam(), *i, &url); | 911 std::string(), search_terms_data.NTPIsThemedParam(), *i, &url); |
| 911 break; | 912 break; |
| 912 | 913 |
| 913 case GOOGLE_OMNIBOX_START_MARGIN: | 914 case GOOGLE_OMNIBOX_START_MARGIN: |
| 914 DCHECK(!i->is_post_param); | 915 DCHECK(!i->is_post_param); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 // patterns. This means that given patterns | 1332 // patterns. This means that given patterns |
| 1332 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], | 1333 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], |
| 1333 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would | 1334 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would |
| 1334 // return false. This is important for at least Google, where such URLs | 1335 // return false. This is important for at least Google, where such URLs |
| 1335 // are invalid. | 1336 // are invalid. |
| 1336 return !search_terms->empty(); | 1337 return !search_terms->empty(); |
| 1337 } | 1338 } |
| 1338 } | 1339 } |
| 1339 return false; | 1340 return false; |
| 1340 } | 1341 } |
| OLD | NEW |