Created
April 22, 2010 23:44
-
-
Save bdimcheff/375992 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a65a98d171d00768cb0592e85f99f24d84fd8a3c Mon Sep 17 00:00:00 2001 | |
From: Brandon Dimcheff <[email protected]> | |
Date: Thu, 22 Apr 2010 19:41:00 -0400 | |
Subject: [PATCH] give me http back | |
--- | |
.../autocomplete/history_contents_provider.cc | 3 +-- | |
.../browser/autocomplete/history_url_provider.cc | 3 +-- | |
chrome/browser/autocomplete/search_provider.cc | 3 +-- | |
chrome/browser/bookmarks/bookmark_table_model.cc | 2 +- | |
chrome/browser/toolbar_model.cc | 2 +- | |
5 files changed, 5 insertions(+), 8 deletions(-) | |
diff --git a/chrome/browser/autocomplete/history_contents_provider.cc b/chrome/browser/autocomplete/history_contents_provider.cc | |
index 1e72ceb..8abb83d 100644 | |
--- a/chrome/browser/autocomplete/history_contents_provider.cc | |
+++ b/chrome/browser/autocomplete/history_contents_provider.cc | |
@@ -75,8 +75,7 @@ void HistoryContentsProvider::Start(const AutocompleteInput& input, | |
// Change input type so matches will be marked up properly. | |
input_type_ = input.type(); | |
- trim_http_ = !url_util::FindAndCompareScheme(WideToUTF8(input.text()), | |
- chrome::kHttpScheme, NULL); | |
+ trim_http_ = false; | |
// Decide what to do about any previous query/results. | |
if (!minimal_changes) { | |
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc | |
index a748700..e9ee281 100644 | |
--- a/chrome/browser/autocomplete/history_url_provider.cc | |
+++ b/chrome/browser/autocomplete/history_url_provider.cc | |
@@ -622,8 +622,7 @@ void HistoryURLProvider::RunAutocompletePasses( | |
// Create a match for exactly what the user typed. This will only be used as | |
// a fallback in case we can't get the history service or URL DB; otherwise, | |
// we'll run this again in DoAutocomplete() and use that result instead. | |
- const bool trim_http = !url_util::FindAndCompareScheme( | |
- WideToUTF8(input.text()), chrome::kHttpScheme, NULL); | |
+ const bool trim_http = false; | |
// Don't do this for queries -- while we can sometimes mark up a match for | |
// this, it's not what the user wants, and just adds noise. | |
if ((input.type() != AutocompleteInput::QUERY) && | |
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc | |
index acba81e..02c4243 100644 | |
--- a/chrome/browser/autocomplete/search_provider.cc | |
+++ b/chrome/browser/autocomplete/search_provider.cc | |
@@ -737,8 +737,7 @@ AutocompleteMatch SearchProvider::NavigationToMatch( | |
AutocompleteMatch match(this, relevance, false, | |
AutocompleteMatch::NAVSUGGEST); | |
match.destination_url = navigation.url; | |
- const bool trim_http = !url_util::FindAndCompareScheme( | |
- WideToUTF8(input_text), chrome::kHttpScheme, NULL); | |
+ const bool trim_http = false; | |
match.contents = StringForURLDisplay(navigation.url, true, trim_http); | |
AutocompleteMatch::ClassifyMatchInString(input_text, match.contents, | |
ACMatchClassification::URL, | |
diff --git a/chrome/browser/bookmarks/bookmark_table_model.cc b/chrome/browser/bookmarks/bookmark_table_model.cc | |
index 0ac5416..b6a64aa 100644 | |
--- a/chrome/browser/bookmarks/bookmark_table_model.cc | |
+++ b/chrome/browser/bookmarks/bookmark_table_model.cc | |
@@ -326,7 +326,7 @@ std::wstring BookmarkTableModel::GetText(int row, int column_id) { | |
? model_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages) | |
: std::wstring(); | |
std::wstring url_text = net::FormatUrl(node->GetURL(), languages, | |
- net::kFormatUrlOmitAll, UnescapeRule::SPACES, NULL, NULL, NULL); | |
+ net::kFormatUrlOmitUsernamePassword, UnescapeRule::SPACES, NULL, NULL, NULL); | |
if (base::i18n::IsRTL()) | |
base::i18n::WrapStringWithLTRFormatting(&url_text); | |
return url_text; | |
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc | |
index c641539..153a340 100644 | |
--- a/chrome/browser/toolbar_model.cc | |
+++ b/chrome/browser/toolbar_model.cc | |
@@ -53,7 +53,7 @@ std::wstring ToolbarModel::GetText() const { | |
url = GURL(url.scheme() + ":"); | |
} | |
} | |
- return net::FormatUrl(url, languages, net::kFormatUrlOmitAll, | |
+ return net::FormatUrl(url, languages, net::kFormatUrlOmitUsernamePassword, | |
UnescapeRule::NORMAL, NULL, NULL, NULL); | |
} | |
-- | |
1.7.0.5+GitX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment