diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 13:11:07 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-16 13:11:07 +0000 |
commit | 2ae6a1af72c78dfaaa738387b9ae5713effa85d7 (patch) | |
tree | 76b29a350a929b17a50a4950830337d8107c744f /ui/base/dragdrop | |
parent | 79b3e6e020ab61e5cab51a97e0837ed89275fa7a (diff) | |
download | chromium_src-2ae6a1af72c78dfaaa738387b9ae5713effa85d7.zip chromium_src-2ae6a1af72c78dfaaa738387b9ae5713effa85d7.tar.gz chromium_src-2ae6a1af72c78dfaaa738387b9ae5713effa85d7.tar.bz2 |
bookmarks: GetNameForURL() function is only used by gtk.
So, move it to c/b/ui/gtk/bookmarks. Where it's more appropriate.
BUG=144783
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11827058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/dragdrop')
-rw-r--r-- | ui/base/dragdrop/os_exchange_data_provider_win.cc | 3 | ||||
-rw-r--r-- | ui/base/dragdrop/os_exchange_data_win_unittest.cc | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc index 5601121..b921ec8 100644 --- a/ui/base/dragdrop/os_exchange_data_provider_win.cc +++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc @@ -388,7 +388,10 @@ bool OSExchangeDataProviderWin::GetURLAndTitle(GURL* url, GURL test_url(url_str); if (test_url.is_valid()) { *url = test_url; + *title = net::GetSuggestedFilename(*url, "", "", "", "", std::string()); return true; + } else { + *title = l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); } } else if (GetPlainTextURL(source_object_, url)) { title->clear(); diff --git a/ui/base/dragdrop/os_exchange_data_win_unittest.cc b/ui/base/dragdrop/os_exchange_data_win_unittest.cc index 909b890..c5b0ed5 100644 --- a/ui/base/dragdrop/os_exchange_data_win_unittest.cc +++ b/ui/base/dragdrop/os_exchange_data_win_unittest.cc @@ -296,7 +296,7 @@ TEST(OSExchangeDataTest, TestURLExchangeFormats) { OSExchangeData data; std::string url_spec = "http://www.google.com/"; GURL url(url_spec); - std::wstring url_title = L"Google"; + std::wstring url_title = L"www.google.com"; data.SetURL(url, url_title); std::wstring output; |