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

Unified Diff: components/toolbar/toolbar_model_impl.cc

Issue 2076303002: Delete query in omnibox code. R.I.P. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused header. Created 4 years, 6 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 e8ae52e50805dc5870aafdb325b745b119ccfb1e..f6c7410c5e0209710216d766ff20d1a8a657cad0 100644
--- a/components/toolbar/toolbar_model_impl.cc
+++ b/components/toolbar/toolbar_model_impl.cc
@@ -8,7 +8,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
-#include "components/google/core/browser/google_util.h"
#include "components/grit/components_scaled_resources.h"
#include "components/prefs/pref_service.h"
#include "components/security_state/security_state_model.h"
@@ -66,26 +65,6 @@ base::string16 ToolbarModelImpl::GetFormattedURL(size_t* prefix_end) const {
gfx::kEllipsisUTF16;
}
-base::string16 ToolbarModelImpl::GetCorpusNameForMobile() const {
- if (!WouldPerformSearchTermReplacement(false))
- return base::string16();
- GURL url(GetURL());
- // If there is a query in the url fragment look for the corpus name there,
- // otherwise look for the corpus name in the query parameters.
- const std::string& query_str(google_util::HasGoogleSearchQueryParam(
- url.ref_piece()) ? url.ref() : url.query());
- url::Component query(0, static_cast<int>(query_str.length())), key, value;
- const char kChipKey[] = "sboxchip";
- while (url::ExtractQueryKeyValue(query_str.c_str(), &query, &key, &value)) {
- if (key.is_nonempty() && query_str.substr(key.begin, key.len) == kChipKey) {
- return net::UnescapeAndDecodeUTF8URLComponent(
- query_str.substr(value.begin, value.len),
- net::UnescapeRule::NORMAL);
- }
- }
- return base::string16();
-}
-
GURL ToolbarModelImpl::GetURL() const {
GURL url;
return delegate_->GetURL(&url) ? url : GURL(url::kAboutBlankURL);
« 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