Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3749)

Unified Diff: chrome/browser/ui/search/search_model.cc

Issue 1428423002: Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac fix Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/search/search_model.h ('k') | chrome/browser/ui/search/search_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_model.cc
diff --git a/chrome/browser/ui/search/search_model.cc b/chrome/browser/ui/search/search_model.cc
index 17d5a96d2c638d0eff20809498a78287ebb86ac4..57b83bd852d9be96f78665621bf6e5c720efe135 100644
--- a/chrome/browser/ui/search/search_model.cc
+++ b/chrome/browser/ui/search/search_model.cc
@@ -7,22 +7,14 @@
#include "chrome/browser/ui/search/search_model_observer.h"
#include "components/search/search.h"
-SearchModel::State::State()
- : instant_support(INSTANT_SUPPORT_UNKNOWN),
- voice_search_supported(false) {
-}
+SearchModel::State::State() : instant_support(INSTANT_SUPPORT_UNKNOWN) {}
SearchModel::State::State(const SearchMode& mode,
- InstantSupportState instant_support,
- bool voice_search_supported)
- : mode(mode),
- instant_support(instant_support),
- voice_search_supported(voice_search_supported) {
-}
+ InstantSupportState instant_support)
+ : mode(mode), instant_support(instant_support) {}
bool SearchModel::State::operator==(const State& rhs) const {
- return mode == rhs.mode && instant_support == rhs.instant_support &&
- voice_search_supported == rhs.voice_search_supported;
+ return mode == rhs.mode && instant_support == rhs.instant_support;
}
SearchModel::SearchModel() {
@@ -75,21 +67,6 @@ void SearchModel::SetInstantSupportState(InstantSupportState instant_support) {
ModelChanged(old_state, state_));
}
-void SearchModel::SetVoiceSearchSupported(bool supported) {
- DCHECK(search::IsInstantExtendedAPIEnabled())
- << "Please do not try to set the SearchModel state without first "
- << "checking if Search is enabled.";
-
- if (state_.voice_search_supported == supported)
- return;
-
- const State old_state = state_;
- state_.voice_search_supported = supported;
-
- FOR_EACH_OBSERVER(SearchModelObserver, observers_,
- ModelChanged(old_state, state_));
-}
-
void SearchModel::AddObserver(SearchModelObserver* observer) {
observers_.AddObserver(observer);
}
« no previous file with comments | « chrome/browser/ui/search/search_model.h ('k') | chrome/browser/ui/search/search_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698