| Index: net/tools/dump_cache/url_to_filename_encoder.h
|
| diff --git a/net/tools/dump_cache/url_to_filename_encoder.h b/net/tools/dump_cache/url_to_filename_encoder.h
|
| index 7918418d5b2832f990a4f350b1afb8e1177bc81e..8a2187e68719addfcf750072b04df144c9b89b92 100644
|
| --- a/net/tools/dump_cache/url_to_filename_encoder.h
|
| +++ b/net/tools/dump_cache/url_to_filename_encoder.h
|
| @@ -94,7 +94,8 @@ class UrlToFilenameEncoder {
|
| // |legacy_escape| indicates that this function should use the old-style
|
| // of encoding.
|
| // TODO(mbelshe): delete the legacy_escape code.
|
| - static std::string Encode(const std::string& url, std::string base_path,
|
| + static std::string Encode(const std::string& url,
|
| + std::string base_path,
|
| bool legacy_escape) {
|
| std::string filename;
|
| if (!legacy_escape) {
|
| @@ -105,7 +106,7 @@ class UrlToFilenameEncoder {
|
| #endif
|
| } else {
|
| std::string clean_url(url);
|
| - if (clean_url.length() && clean_url[clean_url.length()-1] == '/')
|
| + if (clean_url.length() && clean_url[clean_url.length() - 1] == '/')
|
| clean_url.append("index.html");
|
|
|
| std::string host = UrlUtilities::GetUrlHost(clean_url);
|
| @@ -150,11 +151,10 @@ class UrlToFilenameEncoder {
|
| // escaped characters (like %21 for !).
|
| // |dir_separator| is "/" on Unix, "\" on Windows.
|
| // |encoded_filename| is the resultant filename.
|
| - static void EncodeSegment(
|
| - const std::string& filename_prefix,
|
| - const std::string& escaped_ending,
|
| - char dir_separator,
|
| - std::string* encoded_filename);
|
| + static void EncodeSegment(const std::string& filename_prefix,
|
| + const std::string& escaped_ending,
|
| + char dir_separator,
|
| + std::string* encoded_filename);
|
|
|
| // Decodes a filename that was encoded with EncodeSegment,
|
| // yielding back the original URL.
|
| @@ -182,7 +182,8 @@ class UrlToFilenameEncoder {
|
| static std::string LegacyEscape(const std::string& path);
|
|
|
| // Replace all instances of |from| within |str| as |to|.
|
| - static void ReplaceAll(std::string* str, const std::string& from,
|
| + static void ReplaceAll(std::string* str,
|
| + const std::string& from,
|
| const std::string& to) {
|
| std::string::size_type pos(0);
|
| while ((pos = str->find(from, pos)) != std::string::npos) {
|
|
|