| Index: net/tools/quic/quic_in_memory_cache.cc
|
| diff --git a/net/tools/quic/quic_in_memory_cache.cc b/net/tools/quic/quic_in_memory_cache.cc
|
| index af46ca37daaa6c5f5a2bcaeab410cc221f69c11e..3d133e285e3c41682504b28c148a02207ee69086 100644
|
| --- a/net/tools/quic/quic_in_memory_cache.cc
|
| +++ b/net/tools/quic/quic_in_memory_cache.cc
|
| @@ -32,9 +32,7 @@ class CachingBalsaVisitor : public NoOpBalsaVisitor {
|
| virtual void ProcessBodyData(const char* input, size_t size) OVERRIDE {
|
| AppendToBody(input, size);
|
| }
|
| - virtual void MessageDone() OVERRIDE {
|
| - done_framing_ = true;
|
| - }
|
| + virtual void MessageDone() OVERRIDE { done_framing_ = true; }
|
| virtual void HandleHeaderError(BalsaFrame* framer) OVERRIDE {
|
| UnhandledError();
|
| }
|
| @@ -47,9 +45,7 @@ class CachingBalsaVisitor : public NoOpBalsaVisitor {
|
| virtual void HandleBodyError(BalsaFrame* framer) OVERRIDE {
|
| UnhandledError();
|
| }
|
| - void UnhandledError() {
|
| - LOG(DFATAL) << "Unhandled error framing HTTP.";
|
| - }
|
| + void UnhandledError() { LOG(DFATAL) << "Unhandled error framing HTTP."; }
|
| void AppendToBody(const char* input, size_t size) {
|
| body_.append(input, size);
|
| }
|
| @@ -84,12 +80,9 @@ void QuicInMemoryCache::AddSimpleResponse(StringPiece method,
|
| StringPiece response_detail,
|
| StringPiece body) {
|
| BalsaHeaders request_headers, response_headers;
|
| - request_headers.SetRequestFirstlineFromStringPieces(method,
|
| - path,
|
| - version);
|
| - response_headers.SetRequestFirstlineFromStringPieces(version,
|
| - response_code,
|
| - response_detail);
|
| + request_headers.SetRequestFirstlineFromStringPieces(method, path, version);
|
| + response_headers.SetRequestFirstlineFromStringPieces(
|
| + version, response_code, response_detail);
|
| response_headers.AppendHeader("content-length",
|
| base::IntToString(body.length()));
|
|
|
| @@ -115,9 +108,7 @@ void QuicInMemoryCache::AddSpecialResponse(StringPiece method,
|
| StringPiece version,
|
| SpecialResponseType response_type) {
|
| BalsaHeaders request_headers, response_headers;
|
| - request_headers.SetRequestFirstlineFromStringPieces(method,
|
| - path,
|
| - version);
|
| + request_headers.SetRequestFirstlineFromStringPieces(method, path, version);
|
| AddResponse(request_headers, response_headers, "");
|
| responses_[GetKey(request_headers)]->response_type_ = response_type;
|
| }
|
| @@ -141,9 +132,7 @@ void QuicInMemoryCache::Initialize() {
|
| << FLAGS_quic_in_memory_cache_dir;
|
|
|
| FilePath directory(FLAGS_quic_in_memory_cache_dir);
|
| - base::FileEnumerator file_list(directory,
|
| - true,
|
| - base::FileEnumerator::FILES);
|
| + base::FileEnumerator file_list(directory, true, base::FileEnumerator::FILES);
|
|
|
| FilePath file = file_list.Next();
|
| while (!file.empty()) {
|
| @@ -206,9 +195,8 @@ void QuicInMemoryCache::Initialize() {
|
| path.remove_suffix(1);
|
| }
|
| // Set up request headers. Assume method is GET and protocol is HTTP/1.1.
|
| - request_headers.SetRequestFirstlineFromStringPieces("GET",
|
| - path,
|
| - "HTTP/1.1");
|
| + request_headers.SetRequestFirstlineFromStringPieces(
|
| + "GET", path, "HTTP/1.1");
|
| request_headers.ReplaceOrAppendHeader("host", host);
|
|
|
| VLOG(1) << "Inserting 'http://" << GetKey(request_headers)
|
|
|