From 76e7da2f3993ed156cc633d84f0c0d8ce3475e47 Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Fri, 18 Jun 2010 22:44:49 +0000 Subject: Make FixupURL() return a GURL instead of a string (i.e. do fixup + canonicalization). Nearly every caller was already doing this. This in turn allows us to do better fixup/canonicalization of view-source: URLs. We now convert "view-source:google.com" into "view-source:http://google.com/". With a few changes scattered through the omnibox code, this also means we can do HTTP-stripping on view-source: URLs, and support the user typing in things like the case above. This also fixes some weirdness where if you tried to type something starting with "view-source:", the What You Typed match in the dropdown would show only a scheme, or a scheme plus "http:", in some cases. BUG=46612 TEST="view-source:google.com" should work. Review URL: http://codereview.chromium.org/2817011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50290 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/options/general_page_gtk.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'chrome/browser/gtk/options/general_page_gtk.cc') diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc index d36fbac..0df5b20 100644 --- a/chrome/browser/gtk/options/general_page_gtk.cc +++ b/chrome/browser/gtk/options/general_page_gtk.cc @@ -650,9 +650,8 @@ void GeneralPageGtk::SetHomepage(const GURL& homepage) { } void GeneralPageGtk::SetHomepageFromEntry() { - GURL url(URLFixerUpper::FixupURL( - gtk_entry_get_text(GTK_ENTRY(homepage_use_url_entry_)), "")); - SetHomepage(url); + SetHomepage(URLFixerUpper::FixupURL( + gtk_entry_get_text(GTK_ENTRY(homepage_use_url_entry_)), std::string())); } void GeneralPageGtk::EnableCustomHomepagesControls(bool enable) { -- cgit v1.1