Index: components/omnibox/browser/suggestion_answer.cc |
diff --git a/components/omnibox/browser/suggestion_answer.cc b/components/omnibox/browser/suggestion_answer.cc |
index e6fb0be85730d95305eafc5fee507f13739ae090..2564aeedeb87f296d1f7642c7c75d8d5387b1203 100644 |
--- a/components/omnibox/browser/suggestion_answer.cc |
+++ b/components/omnibox/browser/suggestion_answer.cc |
@@ -182,7 +182,8 @@ SuggestionAnswer::SuggestionAnswer() : type_(-1) {} |
SuggestionAnswer::SuggestionAnswer(const SuggestionAnswer& answer) |
: first_line_(answer.first_line_), |
second_line_(answer.second_line_), |
- type_(answer.type_) {} |
+ type_(answer.type_), |
+ second_line_size_(answer.second_line_size_) {} |
groby-ooo-7-16
2016/06/23 20:49:27
Since this is just a default copy ctor, let's do t
Kevin Bailey
2016/06/23 21:49:22
sgtm
Kevin Bailey
2016/06/28 15:59:32
Done.
|
SuggestionAnswer::~SuggestionAnswer() {} |
@@ -206,6 +207,13 @@ std::unique_ptr<SuggestionAnswer> SuggestionAnswer::ParseAnswer( |
!ImageLine::ParseImageLine(second_line_json, &result->second_line_)) |
return nullptr; |
+ for (const auto& text_field : result->second_line_.text_fields()) { |
+ if (text_field.has_num_lines()) { |
+ result->second_line_size_ = text_field.num_lines(); |
+ break; |
+ } |
+ } |
+ |
return result; |
} |