Index: components/omnibox/autocomplete_match.cc |
diff --git a/components/omnibox/autocomplete_match.cc b/components/omnibox/autocomplete_match.cc |
index 558ed93c417838a47d571751bb9febce2e7b83d4..1340e27e05936c29b72ee3b9101e545fd84d6a22 100644 |
--- a/components/omnibox/autocomplete_match.cc |
+++ b/components/omnibox/autocomplete_match.cc |
@@ -12,6 +12,7 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "base/time/time.h" |
#include "components/omnibox/autocomplete_provider.h" |
+#include "components/omnibox/suggestion_answer.h" |
#include "components/search_engines/template_url.h" |
#include "components/search_engines/template_url_service.h" |
#include "grit/components_scaled_resources.h" |
@@ -79,6 +80,7 @@ AutocompleteMatch::AutocompleteMatch(const AutocompleteMatch& match) |
description_class(match.description_class), |
answer_contents(match.answer_contents), |
answer_type(match.answer_type), |
+ answer(match.answer.get() ? new SuggestionAnswer(*match.answer) : NULL), |
groby-ooo-7-16
2014/10/21 00:35:54
UGH. I forgot that AutocompleteMatch can be copy-c
Justin Donnelly
2014/10/21 21:43:54
Yes, I agree that option #2 is probably the right
|
transition(match.transition), |
is_history_what_you_typed_match(match.is_history_what_you_typed_match), |
type(match.type), |
@@ -116,6 +118,7 @@ AutocompleteMatch& AutocompleteMatch::operator=( |
description_class = match.description_class; |
answer_contents = match.answer_contents; |
answer_type = match.answer_type; |
+ answer.reset(match.answer.get() ? new SuggestionAnswer(*match.answer) : NULL); |
transition = match.transition; |
is_history_what_you_typed_match = match.is_history_what_you_typed_match; |
type = match.type; |