Chromium Code Reviews| 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" | 10 #include "base/basictypes.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 | 220 |
| 221 TemplateURLRef::SearchTermsArgs::ContextualSearchParams:: | 221 TemplateURLRef::SearchTermsArgs::ContextualSearchParams:: |
| 222 ~ContextualSearchParams() { | 222 ~ContextualSearchParams() { |
| 223 } | 223 } |
| 224 | 224 |
| 225 // TemplateURLRef ------------------------------------------------------------- | 225 // TemplateURLRef ------------------------------------------------------------- |
| 226 | 226 |
| 227 TemplateURLRef::TemplateURLRef(TemplateURL* owner, Type type) | 227 TemplateURLRef::TemplateURLRef(TemplateURL* owner, Type type) |
| 228 : owner_(owner), | 228 : owner_(owner), |
| 229 type_(type), | 229 type_(type), |
| 230 index_in_owner_(-1), | 230 index_in_owner_(0), |
|
Peter Kasting
2014/07/07 21:07:21
It doesn't actually matter what this is set to, si
| |
| 231 parsed_(false), | 231 parsed_(false), |
| 232 valid_(false), | 232 valid_(false), |
| 233 supports_replacements_(false), | 233 supports_replacements_(false), |
| 234 search_term_key_location_(url::Parsed::QUERY), | 234 search_term_key_location_(url::Parsed::QUERY), |
| 235 prepopulated_(false) { | 235 prepopulated_(false) { |
| 236 DCHECK(owner_); | 236 DCHECK(owner_); |
| 237 DCHECK_NE(INDEXED, type_); | 237 DCHECK_NE(INDEXED, type_); |
| 238 } | 238 } |
| 239 | 239 |
| 240 TemplateURLRef::TemplateURLRef(TemplateURL* owner, size_t index_in_owner) | 240 TemplateURLRef::TemplateURLRef(TemplateURL* owner, size_t index_in_owner) |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1444 // patterns. This means that given patterns | 1444 // patterns. This means that given patterns |
| 1445 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], | 1445 // [ "http://foo/#q={searchTerms}", "http://foo/?q={searchTerms}" ], |
| 1446 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would | 1446 // calling ExtractSearchTermsFromURL() on "http://foo/?q=bar#q=' would |
| 1447 // return false. This is important for at least Google, where such URLs | 1447 // return false. This is important for at least Google, where such URLs |
| 1448 // are invalid. | 1448 // are invalid. |
| 1449 return !search_terms->empty(); | 1449 return !search_terms->empty(); |
| 1450 } | 1450 } |
| 1451 } | 1451 } |
| 1452 return false; | 1452 return false; |
| 1453 } | 1453 } |
| OLD | NEW |