summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 02:50:29 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 02:50:29 +0000
commit6671905a87d483ae64bef162ff1a8d006911286e (patch)
tree3deb3bf66e37841b9d1a3cff6bb9b5c879e65034
parentd9b9e5e88152ded23e8f5d13f4caf100b13a793b (diff)
downloadchromium_src-6671905a87d483ae64bef162ff1a8d006911286e.zip
chromium_src-6671905a87d483ae64bef162ff1a8d006911286e.tar.gz
chromium_src-6671905a87d483ae64bef162ff1a8d006911286e.tar.bz2
Merge 54694 - Fix two bugs caused by scheme stripping:
* We no longer detected that the user was dragging the permanent_text_, and thus that we could give the drag a title and favicon. * We no longer scored hitting enter on the URL as a RELOAD. BUG=47555 TEST=Visit www.google.com. Drag the omnibox text to the desktop. The shortcut should have a title and favicon. Review URL: http://codereview.chromium.org/3030039 TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/3069022 git-svn-id: svn://svn.chromium.org/chrome/branches/472/src@54695 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index 03c8bff..85eb29d 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -154,7 +154,8 @@ void AutocompleteEditModel::GetDataForURLExport(GURL* url,
AutocompleteMatch match;
GetInfoForCurrentText(&match, NULL);
*url = match.destination_url;
- if (UTF8ToWide(url->possibly_invalid_spec()) == permanent_text_) {
+ if (*url == URLFixerUpper::FixupURL(WideToUTF8(permanent_text_),
+ std::string())) {
*title = controller_->GetTitle();
*favicon = controller_->GetFavIcon();
}
@@ -297,7 +298,8 @@ void AutocompleteEditModel::AcceptInput(WindowOpenDisposition disposition,
if (!match.destination_url.is_valid())
return;
- if (UTF8ToWide(match.destination_url.spec()) == permanent_text_) {
+ if (match.destination_url ==
+ URLFixerUpper::FixupURL(WideToUTF8(permanent_text_), std::string())) {
// When the user hit enter on the existing permanent URL, treat it like a
// reload for scoring purposes. We could detect this by just checking
// user_input_in_progress_, but it seems better to treat "edits" that end