diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-03 04:25:37 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-03 04:25:37 +0000 |
commit | 90f399075f9082bf7031512d6579ec1196dc060a (patch) | |
tree | 8d47273615d98732a60d0e77a0787d1623204a4b /net | |
parent | f0f400cb2e0a3c545d723524e8bbaf136caacf81 (diff) | |
download | chromium_src-90f399075f9082bf7031512d6579ec1196dc060a.zip chromium_src-90f399075f9082bf7031512d6579ec1196dc060a.tar.gz chromium_src-90f399075f9082bf7031512d6579ec1196dc060a.tar.bz2 |
Move the clipboard stuff out of base and into app/clipboard. I renamed
clipboard_util to clipboard_util_win since it's Windows-only. This patch makes
test_shell depend on app as well. There should be no logic change.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/260003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/net_util.cc | 22 | ||||
-rw-r--r-- | net/base/net_util.h | 6 |
2 files changed, 2 insertions, 26 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 51cfdf7..b484b0c 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "net/base/net_util.h" + #include <algorithm> #include <map> #include <unicode/ucnv.h> @@ -24,8 +26,6 @@ #include <fcntl.h> #endif -#include "net/base/net_util.h" - #include "base/basictypes.h" #include "base/file_path.h" #include "base/file_util.h" @@ -33,7 +33,6 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/path_service.h" -#include "base/scoped_clipboard_writer.h" #include "base/singleton.h" #include "base/stl_util-inl.h" #include "base/string_escape.h" @@ -1331,23 +1330,6 @@ std::wstring FormatUrl(const GURL& url, return url_string; } -void WriteURLToClipboard(const GURL& url, - const std::wstring& languages, - Clipboard *clipboard) { - if (url.is_empty() || !url.is_valid() || !clipboard) - return; - - string16 text = - // Unescaping path and query is not a good idea because other - // applications may not encode non-ASCII characters in UTF-8. - // See crbug.com/2820. - WideToUTF16(FormatUrl(url, languages, false, UnescapeRule::NONE, NULL, - NULL)); - - ScopedClipboardWriter scw(clipboard); - scw.WriteURL(text); -} - GURL SimplifyUrlForRequest(const GURL& url) { DCHECK(url.is_valid()); GURL::Replacements replacements; diff --git a/net/base/net_util.h b/net/base/net_util.h index 7d6cf81..4d7e0aa 100644 --- a/net/base/net_util.h +++ b/net/base/net_util.h @@ -19,7 +19,6 @@ #include "net/base/escape.h" struct addrinfo; -class Clipboard; class FilePath; class GURL; @@ -240,11 +239,6 @@ inline std::wstring FormatUrl(const GURL& url, const std::wstring& languages) { return FormatUrl(url, languages, true, UnescapeRule::SPACES, NULL, NULL); } -// Writes a string representation of |url| to the system clipboard. -void WriteURLToClipboard(const GURL& url, - const std::wstring& languages, - Clipboard *clipboard); - // Strip the portions of |url| that aren't core to the network request. // - user name / password // - reference section |