| Index: ui/app_list/search_box_model.cc
|
| diff --git a/ui/app_list/search_box_model.cc b/ui/app_list/search_box_model.cc
|
| index a0c210eb4977aef4d8c42a03023130286cf01cae..877d677d0c57f65ead162751f7dc1125d5eec613 100644
|
| --- a/ui/app_list/search_box_model.cc
|
| +++ b/ui/app_list/search_box_model.cc
|
| @@ -27,8 +27,7 @@ SearchBoxModel::SpeechButtonProperty::SpeechButtonProperty(
|
| SearchBoxModel::SpeechButtonProperty::~SpeechButtonProperty() {
|
| }
|
|
|
| -SearchBoxModel::SearchBoxModel() {
|
| -}
|
| +SearchBoxModel::SearchBoxModel() {}
|
|
|
| SearchBoxModel::~SearchBoxModel() {
|
| }
|
| @@ -67,8 +66,8 @@ void SearchBoxModel::SetSelectionModel(const gfx::SelectionModel& sel) {
|
| observer.SelectionModelChanged();
|
| }
|
|
|
| -void SearchBoxModel::SetText(const base::string16& text) {
|
| - if (text_ == text)
|
| +void SearchBoxModel::Update(const base::string16& text, bool is_voice_query) {
|
| + if (text_ == text && is_voice_query_ == is_voice_query)
|
| return;
|
|
|
| // Log that a new search has been commenced whenever the text box text
|
| @@ -77,8 +76,9 @@ void SearchBoxModel::SetText(const base::string16& text) {
|
| UMA_HISTOGRAM_ENUMERATION("Apps.AppListSearchCommenced", 1, 2);
|
| }
|
| text_ = text;
|
| + is_voice_query_ = is_voice_query;
|
| for (auto& observer : observers_)
|
| - observer.TextChanged();
|
| + observer.Update();
|
| }
|
|
|
| void SearchBoxModel::AddObserver(SearchBoxModelObserver* observer) {
|
|
|