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

Unified Diff: ipc/ipc_channel.h

Issue 1377483003: Trim IPC ChannelReader's buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reserve-buffer
Patch Set: Fix USE_ATTACHMENT_BROKER && defined(OS_MACOSX) && !defined(OS_IOS) case Created 5 years, 1 month 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 | « no previous file | ipc/ipc_channel_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.h
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 142f3d59715cfd12fbd4945781090f969e85c015..534511261f72e683e91de244d17e91217c31521c 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -97,6 +97,11 @@ class IPC_EXPORT Channel : public Endpoint {
// Amount of data to read at once from the pipe.
static const size_t kReadBufferSize = 4 * 1024;
+ // Maximum persistent read buffer size. Read buffer can grow larger to
+ // accommodate large messages, but it's recommended to shrink back to this
+ // value because it fits 99.9% of all messages (see issue 529940 for data).
+ static const size_t kMaximumReadBufferSize = 64 * 1024;
+
// Initialize a Channel.
//
// |channel_handle| identifies the communication Channel. For POSIX, if
« no previous file with comments | « no previous file | ipc/ipc_channel_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698