diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 00:38:38 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 00:38:38 +0000 |
commit | d4eafbf25ee2e43dbcee80ccb55a3e5c153dd189 (patch) | |
tree | be8be064771dac45ef5f9d9c26bdead102e3d2b8 /net/base/net_util.cc | |
parent | 2dea04cdfc632bfe29d7ffb436827ea2726ec092 (diff) | |
download | chromium_src-d4eafbf25ee2e43dbcee80ccb55a3e5c153dd189.zip chromium_src-d4eafbf25ee2e43dbcee80ccb55a3e5c153dd189.tar.gz chromium_src-d4eafbf25ee2e43dbcee80ccb55a3e5c153dd189.tar.bz2 |
Revert "Make the net resource interface use StringPiece instead of
std::string. This means we can point directly into the resource in the
binary, instead of copying. This makes sense for the TLD data, which doesn't
need to be copied around."
This reverts commit r5735.
TBR=deanm
Review URL: http://codereview.chromium.org/11298
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.cc')
-rw-r--r-- | net/base/net_util.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc index 1617d85..05419fb 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -800,12 +800,11 @@ std::string CanonicalizeHost(const std::wstring& host, bool* is_ip_address) { #ifdef OS_WIN std::string GetDirectoryListingHeader(const std::string& title) { - static const StringPiece header(NetModule::GetResource(IDR_DIR_HEADER_HTML)); - if (header.empty()) { + std::string result = NetModule::GetResource(IDR_DIR_HEADER_HTML); + if (result.empty()) { NOTREACHED() << "expected resource not found"; } - std::string result(header.data(), header.size()); result.append("<script>start("); string_escape::JavascriptDoubleQuote(title, true, &result); result.append(");</script>\n"); |