summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-12 03:38:57 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-12 03:38:57 +0000
commit48acb99e48e02a4470af2f3c3e195a414a433cd7 (patch)
tree92df0d2bb880edd56f31155c8cf0f8dca7e6ba1d /net
parentd30baca0c9645eb871fe88820b384f7155360dfd (diff)
downloadchromium_src-48acb99e48e02a4470af2f3c3e195a414a433cd7.zip
chromium_src-48acb99e48e02a4470af2f3c3e195a414a433cd7.tar.gz
chromium_src-48acb99e48e02a4470af2f3c3e195a414a433cd7.tar.bz2
Make about:cache entries compatible with `xxd -r`.
* Only one space after the address. * Bytes are separated by a single space * Two spaces after the last byte, followed by the raw contents BUG=none TEST=copy cache entry data to the clipboard, run `pbpaste | xxd -r > file.png`. Open png file. Works. R=rvargas@chromium.org Review URL: https://codereview.chromium.org/18173010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/url_request/view_cache_helper.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/url_request/view_cache_helper.cc b/net/url_request/view_cache_helper.cc
index 223ecc6..346c7cd 100644
--- a/net/url_request/view_cache_helper.cc
+++ b/net/url_request/view_cache_helper.cc
@@ -80,7 +80,7 @@ void ViewCacheHelper::HexDump(const char *buf, size_t buf_len,
const unsigned char *p;
while (buf_len) {
- base::StringAppendF(result, "%08x: ", offset);
+ base::StringAppendF(result, "%08x: ", offset);
offset += kMaxRows;
p = (const unsigned char *) buf;
@@ -90,9 +90,10 @@ void ViewCacheHelper::HexDump(const char *buf, size_t buf_len,
// print hex codes:
for (i = 0; i < row_max; ++i)
- base::StringAppendF(result, "%02x ", *p++);
+ base::StringAppendF(result, "%02x ", *p++);
for (i = row_max; i < kMaxRows; ++i)
- result->append(" ");
+ result->append(" ");
+ result->append(" ");
// print ASCII glyphs if possible:
p = (const unsigned char *) buf;