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

Unified Diff: components/toolbar/toolbar_model_impl.cc

Issue 2232863002: Remove search::GetSearchTerms since it always returns empty string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_query_extract
Patch Set: Android Created 4 years, 4 months 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 | « components/toolbar/toolbar_model_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/toolbar/toolbar_model_impl.cc
diff --git a/components/toolbar/toolbar_model_impl.cc b/components/toolbar/toolbar_model_impl.cc
index f6c7410c5e0209710216d766ff20d1a8a657cad0..e7d693e698e5c3e1c43eb599d4fab8161e6d4de8 100644
--- a/components/toolbar/toolbar_model_impl.cc
+++ b/components/toolbar/toolbar_model_impl.cc
@@ -34,14 +34,6 @@ ToolbarModelImpl::~ToolbarModelImpl() {
}
// ToolbarModelImpl Implementation.
-base::string16 ToolbarModelImpl::GetText() const {
- base::string16 search_terms(GetSearchTerms(false));
- if (!search_terms.empty())
- return search_terms;
-
- return GetFormattedURL(NULL);
-}
-
base::string16 ToolbarModelImpl::GetFormattedURL(size_t* prefix_end) const {
GURL url(GetURL());
// Note that we can't unescape spaces here, because if the user copies this
@@ -70,11 +62,6 @@ GURL ToolbarModelImpl::GetURL() const {
return delegate_->GetURL(&url) ? url : GURL(url::kAboutBlankURL);
}
-bool ToolbarModelImpl::WouldPerformSearchTermReplacement(
- bool ignore_editing) const {
- return !GetSearchTerms(ignore_editing).empty();
-}
-
SecurityStateModel::SecurityLevel ToolbarModelImpl::GetSecurityLevel(
bool ignore_editing) const {
// When editing or empty, assume no security style.
@@ -145,10 +132,3 @@ base::string16 ToolbarModelImpl::GetEVCertName() const {
bool ToolbarModelImpl::ShouldDisplayURL() const {
return delegate_->ShouldDisplayURL();
}
-
-base::string16 ToolbarModelImpl::GetSearchTerms(bool ignore_editing) const {
- if (!url_replacement_enabled() || (input_in_progress() && !ignore_editing))
- return base::string16();
-
- return delegate_->GetSearchTerms(GetSecurityLevel(ignore_editing));
-}
« no previous file with comments | « components/toolbar/toolbar_model_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698