diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 02:49:34 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 02:49:34 +0000 |
commit | 7f2a9dbe56bfa6189271af808c53ccaee193a961 (patch) | |
tree | 7edf0c1f263f6fc8cb8988d0340cd4d7ab55df44 | |
parent | c33f6a6c38aa0af41e9df56ef65f677a84fe0c3d (diff) | |
download | chromium_src-7f2a9dbe56bfa6189271af808c53ccaee193a961.zip chromium_src-7f2a9dbe56bfa6189271af808c53ccaee193a961.tar.gz chromium_src-7f2a9dbe56bfa6189271af808c53ccaee193a961.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54694 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit.cc | 6 |
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 |