Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: net/base/net_util.cc

Issue 11506: Make the net resource interface use StringPiece instead of std::string. This... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/net_module.cc ('k') | net/base/registry_controlled_domain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
===================================================================
--- net/base/net_util.cc (revision 5738)
+++ net/base/net_util.cc (working copy)
@@ -800,11 +800,12 @@
#ifdef OS_WIN
std::string GetDirectoryListingHeader(const std::string& title) {
- std::string result = NetModule::GetResource(IDR_DIR_HEADER_HTML);
- if (result.empty()) {
+ static const StringPiece header(NetModule::GetResource(IDR_DIR_HEADER_HTML));
+ if (header.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");
« no previous file with comments | « net/base/net_module.cc ('k') | net/base/registry_controlled_domain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698