summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorjeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-30 22:46:44 +0000
committerjeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-30 22:46:44 +0000
commitb70386476df8f11fbad872195f48518b20b20b41 (patch)
treea268e4a159d0ad9fd28afc0deaab18f0cc9d604a /net/base
parent07eb4aae66c697e052a0bb04047d468bc441a22c (diff)
downloadchromium_src-b70386476df8f11fbad872195f48518b20b20b41.zip
chromium_src-b70386476df8f11fbad872195f48518b20b20b41.tar.gz
chromium_src-b70386476df8f11fbad872195f48518b20b20b41.tar.bz2
Add the include <iterator> or change the usage of back_inserter to avoid compilation errors in Visual Studio 2010. See http://blogs.msdn.com/b/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx for details.
BUG=71134 TEST=Run the related tests. Review URL: http://codereview.chromium.org/6260024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/net_util.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 8188c92..b4082ec 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -896,10 +896,9 @@ std::wstring FormatUrlInternal(const GURL& url,
// Copy everything before the username (the scheme and the separators.)
// These are ASCII.
- std::copy(spec.begin(),
+ url_string.insert(url_string.end(), spec.begin(),
spec.begin() + parsed.CountCharactersBefore(url_parse::Parsed::USERNAME,
- true),
- std::back_inserter(url_string));
+ true));
const wchar_t kHTTP[] = L"http://";
const char kFTP[] = "ftp.";
@@ -968,8 +967,9 @@ std::wstring FormatUrlInternal(const GURL& url,
if (parsed.port.is_nonempty()) {
url_string.push_back(':');
new_parsed->port.begin = url_string.length();
- std::copy(spec.begin() + parsed.port.begin,
- spec.begin() + parsed.port.end(), std::back_inserter(url_string));
+ url_string.insert(url_string.end(),
+ spec.begin() + parsed.port.begin,
+ spec.begin() + parsed.port.end());
new_parsed->port.len = url_string.length() - new_parsed->port.begin;
} else {
new_parsed->port.reset();
@@ -1191,7 +1191,7 @@ std::wstring IDNToUnicode(const char* host,
// Convert the ASCII input to a wide string for ICU.
string16 input16;
input16.reserve(host_len);
- std::copy(host, host + host_len, std::back_inserter(input16));
+ input16.insert(input16.end(), host, host + host_len);
string16 out16;
size_t output_offset = offset_for_adjustment ?