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

Unified Diff: net/base/net_util.cc

Issue 1548503002: net: extract GetDirectoryListingXXX functions into directory_listing.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 4 years, 11 months 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_util.h ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 52c8bf82b8db14a33fca0b16c737cd1fb9a78909..afd48243bd0697af1affd052cbd5e13b044e9f46 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -23,7 +23,6 @@
#include <unistd.h>
#endif // defined(OS_POSIX)
-#include "base/json/string_escape.h"
#include "base/logging.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -34,10 +33,8 @@
#include "net/base/address_list.h"
#include "net/base/escape.h"
#include "net/base/ip_address_number.h"
-#include "net/base/net_module.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/url_util.h"
-#include "net/grit/net_resources.h"
#include "url/gurl.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_canon.h"
@@ -97,24 +94,6 @@ std::string CanonicalizeHost(const std::string& host,
return canon_host;
}
-std::string GetDirectoryListingHeader(const base::string16& title) {
- static const base::StringPiece header(
- NetModule::GetResource(IDR_DIR_HEADER_HTML));
- // This can be null in unit tests.
- DLOG_IF(WARNING, header.empty()) <<
- "Missing resource: directory listing header";
-
- std::string result;
- if (!header.empty())
- result.assign(header.data(), header.size());
-
- result.append("<script>start(");
- base::EscapeJSONString(title, true, &result);
- result.append(");</script>\n");
-
- return result;
-}
-
inline bool IsHostCharAlphanumeric(char c) {
// We can just check lowercase because uppercase characters have already been
// normalized.
« no previous file with comments | « net/base/net_util.h ('k') | net/base/net_util_icu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698