diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 22:15:28 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 22:15:28 +0000 |
commit | cfb1e4adf25f5839b489e2ca89c61778b71f967c (patch) | |
tree | 7b17d3a8dddc212fd76a22bdb8f39a62b779ac20 | |
parent | b5568aba81cf5914a3c56edbfc2b40a6cc7790d2 (diff) | |
download | chromium_src-cfb1e4adf25f5839b489e2ca89c61778b71f967c.zip chromium_src-cfb1e4adf25f5839b489e2ca89c61778b71f967c.tar.gz chromium_src-cfb1e4adf25f5839b489e2ca89c61778b71f967c.tar.bz2 |
Use URLFixerUpper to clean up potential url before going there.
Review URL: http://codereview.chromium.org/42249
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11784 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/tab_contents_controller.mm | 8 | ||||
-rw-r--r-- | chrome/chrome.gyp | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/tab_contents_controller.mm b/chrome/browser/cocoa/tab_contents_controller.mm index 985e69e..69f3ba6 100644 --- a/chrome/browser/cocoa/tab_contents_controller.mm +++ b/chrome/browser/cocoa/tab_contents_controller.mm @@ -10,6 +10,7 @@ #import "chrome/browser/location_bar.h" #import "chrome/browser/tab_contents/tab_contents.h" #import "chrome/browser/toolbar_model.h" +#import "chrome/browser/net/url_fixer_upper.h" // For now, tab_contents lives here. TODO(port):fix #include "chrome/common/temp_scaffolding_stubs.h" @@ -267,7 +268,12 @@ LocationBarBridge::LocationBarBridge(TabContentsController* controller) } std::wstring LocationBarBridge::GetInputString() const { - return base::SysNSStringToWide([controller_ locationBarString]); + // TODO(shess): This code is temporary until the omnibox code takes + // over. + std::wstring url = base::SysNSStringToWide([controller_ locationBarString]); + + // Try to flesh out the input to make a real URL. + return URLFixerUpper::FixupURL(url, std::wstring()); } void LocationBarBridge::FocusLocation() { diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 1636fef..9eab1fb 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -2108,7 +2108,6 @@ 'browser/navigation_controller_unittest.cc', 'browser/net/resolve_proxy_msg_helper_unittest.cc', 'browser/net/url_fetcher_unittest.cc', - 'browser/net/url_fixer_upper_unittest.cc', 'browser/password_manager/encryptor_unittest.cc', 'browser/password_manager/password_form_manager_unittest.cc', 'browser/printing/page_number_unittest.cc', |