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

Side by Side Diff: net/tools/content_decoder_tool/content_decoder_tool.cc

Issue 2525743002: Make URLRequestContext a MemoryDumpProvider (Abandoned) (Closed)
Patch Set: rebased to 7f3d142161b15869f6bea58ac43c5f52ce5834ac Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/tools/content_decoder_tool/content_decoder_tool.h" 5 #include "net/tools/content_decoder_tool/content_decoder_tool.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 if (input_stream_) { 42 if (input_stream_) {
43 input_stream_->read(dest_buffer->data(), buffer_size); 43 input_stream_->read(dest_buffer->data(), buffer_size);
44 int bytes = input_stream_->gcount(); 44 int bytes = input_stream_->gcount();
45 return bytes; 45 return bytes;
46 } 46 }
47 return ERR_FAILED; 47 return ERR_FAILED;
48 } 48 }
49 49
50 std::string Description() const override { return ""; } 50 std::string Description() const override { return ""; }
51 51
52 void DumpMemoryStats(
53 base::trace_event::MemoryAllocatorDump* dump) const override {}
54
52 private: 55 private:
53 std::istream* input_stream_; 56 std::istream* input_stream_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(StdinSourceStream); 58 DISALLOW_COPY_AND_ASSIGN(StdinSourceStream);
56 }; 59 };
57 60
58 } // namespace 61 } // namespace
59 62
60 // static 63 // static
61 bool ContentDecoderToolProcessInput(std::vector<std::string> content_encodings, 64 bool ContentDecoderToolProcessInput(std::vector<std::string> content_encodings,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 108 }
106 output_stream->write(read_buffer->data(), bytes_read); 109 output_stream->write(read_buffer->data(), bytes_read);
107 // If EOF is read, break out the while loop. 110 // If EOF is read, break out the while loop.
108 if (bytes_read == 0) 111 if (bytes_read == 0)
109 break; 112 break;
110 } 113 }
111 return true; 114 return true;
112 } 115 }
113 116
114 } // namespace net 117 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698