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/autocomplete/autocomplete_match.h" | 5 #include "chrome/browser/autocomplete/autocomplete_match.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/browser/autocomplete/autocomplete.h" | 10 #include "chrome/browser/autocomplete/autocomplete.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 description(match.description), | 66 description(match.description), |
67 description_class(match.description_class), | 67 description_class(match.description_class), |
68 transition(match.transition), | 68 transition(match.transition), |
69 is_history_what_you_typed_match(match.is_history_what_you_typed_match), | 69 is_history_what_you_typed_match(match.is_history_what_you_typed_match), |
70 type(match.type), | 70 type(match.type), |
71 keyword(match.keyword), | 71 keyword(match.keyword), |
72 starred(match.starred), | 72 starred(match.starred), |
73 from_previous(match.from_previous) { | 73 from_previous(match.from_previous) { |
74 if (match.associated_keyword.get()) | 74 if (match.associated_keyword.get()) |
75 associated_keyword.reset(new AutocompleteMatch(*match.associated_keyword)); | 75 associated_keyword.reset(new AutocompleteMatch(*match.associated_keyword)); |
| 76 if (match.search_terms_args.get()) |
| 77 search_terms_args.reset( |
| 78 new TemplateURLRef::SearchTermsArgs(*match.search_terms_args.get())); |
76 } | 79 } |
77 | 80 |
78 AutocompleteMatch::~AutocompleteMatch() { | 81 AutocompleteMatch::~AutocompleteMatch() { |
79 } | 82 } |
80 | 83 |
81 AutocompleteMatch& AutocompleteMatch::operator=( | 84 AutocompleteMatch& AutocompleteMatch::operator=( |
82 const AutocompleteMatch& match) { | 85 const AutocompleteMatch& match) { |
83 if (this == &match) | 86 if (this == &match) |
84 return *this; | 87 return *this; |
85 | 88 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 << " is unsorted in relation to last offset of " << last_offset | 348 << " is unsorted in relation to last offset of " << last_offset |
346 << ". Provider: " << (provider ? provider->name() : "None") << "."; | 349 << ". Provider: " << (provider ? provider->name() : "None") << "."; |
347 DCHECK_LT(i->offset, text.length()) | 350 DCHECK_LT(i->offset, text.length()) |
348 << " Classification of [" << i->offset << "," << text.length() | 351 << " Classification of [" << i->offset << "," << text.length() |
349 << "] is out of bounds for \"" << text << "\". Provider: " | 352 << "] is out of bounds for \"" << text << "\". Provider: " |
350 << (provider ? provider->name() : "None") << "."; | 353 << (provider ? provider->name() : "None") << "."; |
351 last_offset = i->offset; | 354 last_offset = i->offset; |
352 } | 355 } |
353 } | 356 } |
354 #endif | 357 #endif |
OLD | NEW |